Redeeming that Windows 10 Edition code is separate from migrating to a Microsoft account. The code was just a free perk.
If you have not migrated your Mojang account yet, you have two options:
- Migrate your profile to the same Microsoft account as the one on which you redeemed that Windows 10 Edition code. The benefit of this is that all your PC Minecraft is on one login.
- Migrate your profile to a different Microsoft account, allowing you to double dip. You’ll end up with two Microsoft accounts, but also two Minecraft: Java Edition and Minecraft for Windows 10 licenses. It’s free real estate.