What is the strict difference between #1 and #2?
#1. How long does it take to get to school on foot?#2. How long does it take to go to school on foot?
#1. What is the best way to get to Osaka from Tokyo? #2. What is the best way to go to Osaka from Tokyo?
To go is to move, travel. It refers to the action, the journey.
To get is the result of that action. To get is to reach, to arrive. It's not an action.
Nevertheless, the meaning of the two different questions is basically the same.