If you already filed and the information you provided is for an invalid account, the bank rejects your refund deposit and sends it back to IRS. The IRS then has to reprocess, cut a check and mail it to the address on your return. See below for how long this may take; per the IRS's rules.
However, if the return hasn't already posted to the IRS's system yet, you can call and ask them if they can stop the direct deposit before it goes to that account, and mail a check instead. You can call them toll-free at 800-829-1040, M - F, 7 a.m. - 7 p.m.
Per IRS: "Refunds that are not direct deposited because of institutional refusal,
erroneous account or routing transit numbers, closed accounts, bank mergers or any other reason are issued as paper checks,
resulting in refund delays of up to ten weeks." More details can be found here
Refund Returns