To migrate your Minecraft Java account to Microsoft, you will first need to log into your Mojang account.
You log into your Mojang account by heading over to the official Mojang website and punching all of your info in - use the email you created your java account and your password.
Once logged in, you should be taken directly to your profile, but in case you weren't, you can find your profile by clicking your email at the top right of your screen. A small tab will open up, and you will need to click profile.
After this, you will be taken to your profile, and at the top of your screen will be a small tab that will give you the option to move your account. Click the green move my account button to begin the process of Migrating your account to Microsoft.
The first step will be to confirm your email address. This will require a code Mojang will send to the email you created the account on. Grab the code input it into the box that will appear right after you get the code.
Next, you will need to create a Microsoft and Xbox account. If you have one already for both, just log into the Microsoft account now, and your Java account will automatically migrate over and be linked.
If you don't have one yet, create one now for both Microsoft and Xbox, and log in with the Microsoft account to migrate your java account to Microsoft.
Check out some of our other awesome Minecraft guides!