The sun has less gravitational pull on Neptune because it is farther away. Gravity is the force by which a planet or other body draws objects towards its center.
Gravity keeps all the planets in its position and allows it to move in its orbit.
The force of gravity is inversely proportional to the distance between two objects.
So when the distance increases, the force weakens. Since Neptune approximately 4.8 billion kilometers away from the sun, its gravitational force is very less.