To link your Java account see How to link your Java Minecraft account to your forums account

How to link your account

Go to the forums and in your account details click Connected accounts

On Passport click Add below the Bedrock accounts table

Join the server. (More information about joining HERE)

Run the /passport command with your special code