If address B is an alias then: Add and manage email aliases for iCloud Mail on iCloud.com - Apple Support - "Note: You can’t delete or turn off a primary iCloud Mail address. You can’t use an alias to create a separate Apple ID, and an email alias can’t be converted to a primary iCloud Mail address."
I guess now I am not clear if you have two accounts (formerly called Apple ID but recently changed because it was easy to confuse Apple ID meaning just the email address used as a username for an account with the entire account being called that), or if your second address is an alias. If these are two accounts then your second account also has the identifier B@icloud.com permanently assigned to it and it cannot be changed or transferred. If B@icloud.com is an alias then it also can't be transferred, as in my previous paragraph.
In addition to trying to formally change the entire Apple ID to an iCloud address there's also: Change your Apple Account primary email address - Apple Support
- "If you try to change your Apple ID to an @icloud.com email address that was created within the last 30 days, you will be asked to try again later."
It can be tricky to switch email addresses between different accounts even under the best of circumstances. In fact, until recently you couldn't do it at all. On top of that, the addresses you are trying to switch are iCloud addresses which have their own set of issues. I don't have an iCloud address but I have seen recent posts where people say they can log in with their regular email address (fred@gmail or whatever) or their iCloud address. They claim Apple accepts either. In that case, as I said in my previous reply, the iCloud address is permanently linked to the account under which it was created. If you were trying to switch A@gmail with B@gmail that would be possible but tricky, but you can't do A@iCloud with B@iCloud.