According to the theory of gravitation, the earth must be continually “falling” toward the sun. If this is true, why does the average distance between earth and sun not grow smaller?

Without gravity, the Earth would go in a straight line. It falls toward the Sun exactly enough to keep it in a near circular orbit.

Yes, the Earth is constantly falling toward the Sun but its orbital velocity keeps it from being drawn into the Sun entirely. There are two ways of viewing this.
First, the Law of Universal Gravitation states that each particle of matter attracts every other particle of matter with a force that is directly proportional to the product of their masses and inversely proportional to the square of the distance between them. Expressed mathematically,
F = GM(m)/r^2
where F is the force with which either of the particles attracts the other, M and m are the masses of two particles separated by a distance r, and G is the Universal Gravitational Constant. The product of G and, lets say, the mass of the earth, is sometimes referred to as GM or µ (the greek letter pronounced meuw as opposed to meow), the earth's gravitational constant. Thus the force of attraction exerted by the earth on any particle within, on the surface of, or above, is F = 1.407974x10^16 ft^3/sec^2(m)/r^2 where m is the mass of the object being attracted and r is the distance from the center of the earth to the mass. The force of attraction which the earth exerts on our body, that is, the pull of gravity on it, is called the weight of our body, and shows how heavy the body is. Thus, our body, being pulled down by by the earth, exerts a force on the ground equal to our weight. The ground being solid and fixed, exerts an equal and opposite force upward on our body and thus we remain at rest.
If there were no primary gravitational field, such as the Sun, the earth would continue in a relatively straight line through space forever. But, the Sun's gravitational field being ~333,000 times greater than Earths, it comes as no surprise that the Sun has the tremendous impact on the earth's movement that we are all familiar with.
There is a gravitational force acting on the Earth due to the Sun's gravitational field. With the Sun's gravitational constant, GM, being ~4.688x10^21 and the Earth's mass being ~1.32x10^25, and r = ~93,000,000 miles, = 4.9104x10^11 ft., the force of attraction exerted by the Sun on the Earth is
F = 4.688x10^21[1.32x10^25]/[4.9104^11]^2 = 2.566x10^23 lbs.
With this constant force being exerted on the earth, and using F = ma, it is therefore found that the Earth is being pulled toward the Sun with an acceleration of

a = F/m = 2.566x10^23/1.32x10^25 = ~.019 ft./sec.^2

With a mean Earth velocity of ~97,741 ft./sec., and ignoring its circular path for the moment, in one minute, the earth moves ~351,867,600 ft. through space, perpendicular to the radial distance to the Sun. Thus, if there were no gravitational affects, the hypothetical radial distance of the Earth from the Sun after one minute would be sqrt[(4.9104x10^22)^2 + 351,867,600^2] = 491,040,123,120 ft.. But during the same one minute time period, the Earth falls toward the Sun by ~123,120 ft. (h = gt^2/2 = .019(3600^2)/2.) So, subtracting the 123,120 ft. it has fallen from its hypothetical distance, it ends up at the same distance from the Sun as it was one minute earlier. So what does this tell us. Right, the Earth is falling toward the Sun at a rate, such that it maintains a constant radial distance of ~93,000,000 miles from the Sun (the mean value).
The other way of viewing it is by considering a ball on a string, being whirled over your head. The whirling ball is exerting a centrifugal force on the string due to its rotational velocity while, at the same time, the string is exerting a centripetal force on the ball, keeping it from flying off into the air. Consider the string as gravity. The gravitational pull of the Sun on the earth remains as 2.566x10^23 lbs. The centrifugal force developed by the orbiting earth is
F = mV^2/r = 1.32x10^25[97,741]^2/[93,000,000(5280)] = 2.566x10^23 lbs.
What do you know? The outward centrifugal force exactly balances the inward gravitational pull, so the earth remains at the mean distance of ~93,000,000 miles from the Sun.

According to the theory of gravitation, the Earth is constantly falling toward the Sun but its orbital velocity keeps it from being drawn into the Sun entirely. This means that the average distance between the Earth and Sun does not grow smaller. The force of attraction between two objects is given by the Law of Universal Gravitation, which states that the force is directly proportional to the product of their masses and inversely proportional to the square of the distance between them.

To understand why the average distance between the Earth and Sun does not change, we can consider two views. First, let's think about the force of attraction between the Earth and Sun. The force of attraction between two objects is given by the equation F = GM(m)/r^2, where F is the force of attraction, G is the Universal Gravitational Constant, M and m are the masses of the two objects, and r is the distance between their centers. In this case, the force of attraction between the Earth and Sun is constantly pulling the Earth towards the Sun.

However, the Earth also has a certain velocity that keeps it from falling into the Sun. This velocity is called the orbital velocity. If there were no gravitational field from the Sun, the Earth would continue moving in a straight line through space. But because of the Sun's tremendous gravitational field, the Earth is pulled towards the Sun and continuously falls towards it. However, the Earth's orbital velocity is just enough to keep it moving around the Sun in a near-circular orbit. This means that while the Earth is falling towards the Sun, it is also moving forward fast enough that it does not get pulled into the Sun entirely.

Another way to understand this is by considering a ball on a string, being whirled over your head. The ball is exerting a centrifugal force on the string due to its rotational velocity, while the string exerts a centripetal force on the ball, keeping it from flying off into the air. In this analogy, gravity is represented by the string. The gravitational pull of the Sun on the Earth remains constant, but the Earth's orbital velocity creates an outward centrifugal force. This centrifugal force exactly balances the inward gravitational pull, resulting in the Earth remaining at a constant average distance from the Sun.

In conclusion, the Earth is constantly falling toward the Sun due to the force of gravity, but its orbital velocity keeps it from getting pulled into the Sun entirely. The combination of the gravitational attraction and the Earth's orbital velocity results in a stable orbit and a constant average distance between the Earth and Sun.