If I understand the situation correctly, use a journal entry with exactly the entries you mentioned. What you are doing is transferring the liability of the amount you owe your supplier to the liability of what you owe on the loan. (Of course, the loan account must be created under your chart of accounts first.)
I have the same problem. Using a journal entry I can reduce the Accounts Payable amount and increase the appropriate Loan Account but that leaves the Supplier Invoice unpaid and overdue. What I would like to do is “Spend Money” to pay the Suppliers Invoice but not from the company bank account, rather from the Loan Account.
In your Journal when you enter Accounts Payable you should also enter the invoice number being paid
If you leave the invoice field blank, your transaction will end up in BS Equity Suspense