The ability to control one's range (distance control) indicates one's subjective measure of the knowledge of footwork-----------in turn, footwork provides us with the extent of one's experience and wisdom in predicting the vector of (a) moving object(s).
Repeated drills can initially help us with the basics of this, but at some point, drills must shift slowly into partial sparring and then eventually into full sparring.
Ultimately, it is through the study of patterns within the phenomenon of uncertainty that we must find confidence and certitude in our range control.
Range is a multifaceted subsystem that consists of: Kicking, Punching, Clinching, and Ground-fighting. In an all-out fight, all four could get utilized and do in fact have some relative frequency in their occurrence. This is why the adequate proficiency of these ranges-------and more importantly the seamless flow, in and out of these ranges could help one increase the odds of shifting the end result of a fight in one's favor.
In short--------in order to better develop one's range control, it is advisable to not just move mindlessly, but pay close attention to patterns and behaviors in your partners' movements and learn to find the best advantageous place where your gut-feel tells you to place yourself at any given moment. Go slow and learn to be methodical. Listen to your instinct and don't be afraid of making mistakes in interpreting the voice of that intuitive instinct. This is a process of refinement and requires work to fine-tune your range-----backed by footwork.
Good luck.