Hello, thank you for reaching out to Microsoft Q&A.
May I please know how long you have been trying to add your @gmail.com account as the primary alias?
Please note that the alias you are trying to add must not be associated with any other Microsoft account. If you have already added this Gmail address as an alias for another Microsoft account, you will not be able to add it again to a different account.
If you continue to experience the same error, try using a different device or web browser to see if you can add it. You can also try using an incognito/private browsing window and check if you are able to add it there.
Important note -
You can add up to 10 aliases (max)to your Microsoft account. And,
You can only add or remove aliases two times a week. If you have already made two changes this week, such as adding two aliases or adding one, removing it, and then adding another, you will need to wait until next week to add another alias.