How to change your Game Directory in Minecraft
Changing the game directory for a launcher profile allows you to separate multiple versions of the game or put your game in another disk Do note that even if you change the game directory(for saves, resourcepacks, etc), the main .minecraft folder is used for storing the binaries
Step 1
Create an empty folder. This is where all the folders for you new installation will go.
Step 2
Open the Minecraft launcher and click Installations
Find the installation profile you want to have the new directory, click the three dots on right and click Edit
Step 3
Under Game Directory
click Browse
Step 4
In the folder Window that opens, find the folder which we created earlier and click Open. Then click Save in the bottom-right.
Done!