Dear Student
Yes The Gravitational force of Sun is stronger than that of Earth and Moon. But when we travel in space we don't move forward due to this force it is because of rocket/ shuttle speed and force. So we can reach at our target only not on Sun.
It is similar to case on earth.
When you drive a car you can turn it wherever you want. It doesn't move due to gravitational force between objects.
Regards