Very very far indeed. The thing is you will still feel Earth's gravity even at a distance. The moon for instance stays where it is because of
Earth's gravity. If you want to escape the Earth's gravity you need to reach
escape velocity.
From Wikipedia:
Escape Velocity
gravitational field and a given position, the escape velocity is the minimum speed an object without propulsion, at that position, needs to have to
move away indefinitely from the source of the field, as opposed to falling back or staying in an orbit within a bounded distance from the source. The
object is assumed to be influenced by no forces except the gravitational field; in particular there is no propulsion, as by a rocket, there is no
friction, as between the object and the Earth's atmosphere (these conditions correspond to freefall) and there is no gravitational radiation. This
definition may need modification for the practical problem of two or more sources in some cases. In any case, the object is assumed to be a point with
a mass that is negligible compared with that of the source of the field, usually an excellent approximation. It is commonly described as the speed
needed to "break free" from a gravitational field.
One somewhat counterintuitive feature of escape velocity is that it is independent of direction, so that "velocity" is a misnomer; it is a scalar
quantity and would more accurately be called "escape speed". The simplest way of deriving the formula for escape velocity is to use conservation of
energy, thus: in order to escape, an object must have at least as much kinetic energy as the increase of potential energy required to move to infinite
height.
The article continues to say:

On the surface of the Earth the escape velocity is about 11.2 kilometres per second. However, at 9000 km altitude in "space", it is slightly
less than 7.1 km/s.
For a body rotating about its axis the escape velocity with respect to the surface does depend on direction e.g., for the Earth the rotational
velocity is 465 m/s to the east at the equator, and the escape velocity to the east, with respect to the Earth's surface, is ca. 10.7 km/s.
The rest of the article is somewhat technical for my understanding, but I believe that the further away you are from the source, the less speed it
takes to break-away.