Sorry, I don't agree that time will correct it. More training will correct it. Specifically, more training while your dog is distracted and excited will correct it.
For example, if your dog gets distracted by other dogs, take him to the park and work with him about 50 ft away from other dogs, far enough that he knows the dogs are there, but he's not too excited by them. Go through a quick routine of his commands (I love using a clicker for this). If he works through his commands successfully, then move closer to the dogs another 5 feet and do the same thing.
Keep working your way closer to the other dogs. When you notice that your dog STARTS to look distracted, back up a bit -- just a bit -- to where he was last successful. Then work him at that place for a while. Be sure to make your commands clear, and be sure that your rewards are BIG. Lots of praise and high value treats. You need to make yourself more interesting than the other dogs.
Once he's performed a round or two of commands successfully in an area where he is just slightly distracted, stop for the day.
Next time you go to the park (the next day, presumably), find some more dogs and START at about the distance that you left off at, or maybe 5 feet farther away. Then work your way forward toward the dogs again. The closer you get to your distraction (in this case the dog), you'll start to make your approach smaller and smaller. At first, you may move 10 feet at a time. Then 5 feet. By the third session, you may only be moving about 6 inches. That's normal, and good. You never want to move faster than your puppy is ready to move.
If you continue to do this over and over in lots of new places and with lots of distractions, you'll find that your pup will be able to tune in to you -- and tune out the distractions -- relatively easy because he'll be practicing it all the time with you. Puppy classes and basic obedience classes are perfect for this because there are all sorts of squirrelly dogs in class. You don't even need to go anywhere else. You get built-in distractions right there! (But you SHOULD go other places because your dog needs to learn to ignore distractions everywhere, not just in the classroom.
I do this with other dogs, children (my dogs LOVE kids), squirrels running around and climbing in a grove of trees...anything I can find that I think my dogs would find distracting.
Also, with regard to your pup having a hard time focusing while excited, there's a somewhat easy -- and fun -- way to overcome this. Get a tug toy (not his super favorite tug though). Start with your pup in a sit, then tell him "Tug!" Let him tug for about 30-40 seconds with you. Then take away the tug and quickly tell him to Sit (or down, whatever you're working on). The instant that he sits, you release him with your release work (Ok!) and let him tug again (that's his reward for doing the sit well). Then you do the whole thing again. If your pup knows several commands, then mix up the commands. When you're done playing (be sure you end the game while he's still wanting more), tell him Enough and put the toy away til next time.
While you're first starting to work on this with your pup, don't tug with him any other time. This way, he learns that the only way he gets to play tug is to play this game with you. The faster he responds to your commands, the faster he gets to continue tugging. As he learns how the game works, you can let him tug for longer periods of time. His excitement level will get higher, but he'll know to listen for your commands.
And Voila! A puppy that listens even when he's excited.