You may follow the below steps in resolving such a case:
- Select the Account in the Accounts tab that has the issue with the mailbox license
- Click on the Match option and unmatch that account
- Delete the account in the Accounts tab (don't delete anything either on the source or target O365 tenants)
- Re-run Discovery Accounts
- Match/Map this account
- Re-run the Mailbox migration
The above steps should clear previously cached mailbox license information
You may follow this KB for unmatching the account
How to fix an incorrectly mapped account? (262036)