To keep the proper distance, you have to be able to read your opponent's telegraphic moves. The reactionary gap is the time you have between identifying an attack and reacting to it. To decrease your reactionary gap, decrease the time you need for each of these steps, or find a way to give yourself more time for each step. Since the hand is quicker than the eye, this information must be dealt with in an unconscious, reflexive manner, rather than in a conscious thought process, because the thinking process does not function that fast. To minimize reaction time and deliver the appropriate response, the human body must be programmed to respond immediately without the time-consuming burden of thinking. You achieve this with proper training.
During training, practice closing the distance until you are able to instantly close on an opponent without telegraphing your intentions.