In order to begin hitting it on the course like you do on the range, you need to start convincing yourself that each shot you hit on the golf course is exactly the same as the shots you hit on the driving range. This is easier said than done, but it is really the only way to create that good mindset that you have on the range. Also, you need to focus entirely on where you want the ball to go, not on where you DON’T want the ball to go. It is very easy to step up on a hole that has OB right and water left and says, “Don’t go right, there’s Out of Bounds!” The way your brain works, it typically thinks in images. If you are thinking about not hitting it right, your brain is focused on RIGHT, and it will actually manipulate your body to help the ball go in that direction. So you need to focus intently on the fairway (an extremely small piece of the fairway, like a small mower cut or a distant tree branch) to help your body perform the way you want it to.
Next time you go out to play, pretend that each shot you hit is being hit on the driving range. And when you come to a hole that has trouble, focus only on where you want the ball to go without any thoughts of where it can’t go.