An easier way may be to bulk move the entries. If you can identify the entries in the chart of accounts, and they’re not grouped with other values (e.g. if you have several payments on one line), you can use the bulk re-code tool.
There’s more information on this, here: Bulk change incorrect postings