Please know that, changing the payment method from cash to bank is not possible once the payment has already been deposited.
However, I recommend deleting the transaction with a cash payment and recreating it with the correct bank account. This won't affect the invoice, it will just update how the payment was received.