Hey there, DanielleConners
Welcome to the Microsoft Community forums.
You will need to return the purchased game, otherwise you are going to have two versions of Minecraft. One Windows 10 and the other Java.
You should be able to do this on https://account.microsoft.com
You will need to switch out of S mode on Windows 10. To do this, search for Windows to S mode in store and you should see an option to switch out of it.
You will need to buy and install Java Edition of Minecraft though this link here:
https://www.minecraft.net/en-us/download/
Hope this helps,
Regards,