Well unless you are playing at a tour event type course where they give you brand new
Titleist to hit at the range, those range balls are low compression cheap two piece hard balls. On the couse you arre playing your golf balls, try to switch to maybe a noodle or top flite, maybe pinacle, any two piece ball will give you more distance. Of course there is a trade off to that distance, stopping power on the green and workability (spin).
Second thing, you can not trust yardage at a range, it can be as much as 20 yards off, because they usually move the tee box to help the grass seed and re-grow. Unless you at a mat type range, which I highly recommend to NEVER hit balls off, they are hard on
clubs (loft & lie changes happen quickly, shaft damage is almost unavoidable) and give poor feedback on your shoots, the club will just bounce into the ball, even cleanly hit balls don't react correctly, because no courses don't have concrete under the grass...lol
Third, chances are you are more relaxed on the range, on the course you only have one shot, any tension reduces distance. So on the range, setup as you do on the course for each shot, takes longer to hit a bucket of balls, but it puts you into more of a course type frame of mind. When I say setup as you do on course, I mean the whole pre shot routine, pick a target, stand behind the ball, walk into the shot get your alignment, grip, etc...what ever your preshot is, do it all, just like you play. This way on the course, it is more like on the range.