It depends on your aircraft type. I like to lower the gear no later than 5-6 NM.
It is varying according with ATC instructions, weather, density of trafic, etc...
Heavy aircraft usually configure early, also to avoid producing too much wake turbulence.