Sir,
According to rule 87 (13 Of CGST Rules, 2017 "A registered person may, on the common portal, transfer any amount of tax, interest, penalty, fee or any other amount available in the electronic cash ledger under the Act to the electronic cash ledger for Integrated tax, Central tax, State tax or Union territory tax or cess in FORM GST PMT-09*.
This rule is not worried about the source from which the fund has been credited to the electronic Credit Ledger.
Therefore you can transfer the fund from one major head to another major head or one minor head to another minor head under the same major head. Therefore you can transfer the fund under PMT-9.