OK first understand that almost everyone gets passed over for promotion at times in their career. It doesn't mean the end of your career, not even at that place.
Asking why you did not get teh promotion was a good move. Now what you have to do is get the kind of experience your boss told you that you need to get to that next level. This means you have to learn to present your ideas to people in a less technical fashion and you have to start talking to the users. You need to ask for opportunities to do these things. Volunteer for presentations, ask to be invited to meetings and then contribute to them. Learn to present things in business, not technical terms. You probably also need to make sure that people are aware of your desire to move up and that they are familar with your contributions.
Next to get promoted you are going to have to impress your new team lead among other people. I get that you may resent his promotion, most people would (if you don't, then cool, but this is partly here for future readers as well). But you have to get past that and work well with this person. This is probably the most critical thing. You will destroy your career at this place if you let your feelings about his promotion affect your working relationships.
Work well for him and get him on your side. Tell him that you want to be in a position to get his job when he gets promoted and ask for the kinds of tasks you need to get there (wait a little before having this conversation, it might seem a bit creepy to him immediately after the promotion). Observe him carefully and see how he interacts with marketing. He got selected over you, so you need to learn what he has to teach about dealing with people outside the developemnt world. Make him into your mentor. If he got this promotion only two months out of school, he is likely good at office politics, so learn about that as well. And above all, realize it doesn't matter if he is older or younger than you or if he has less experience or just different experience. Those things are irrelevant to the fact that he has the job now, so don't let them hinder you in dealing with him.
He might be a terrific team lead or he might not (weak or inexperienced devs are sometimes great leads because they prefer dealing with people to code). If he is great then learn from him.
If he is not so good then take the opportunity to step up to the plate and provide what he is missing (without being nasty about it, he should never know that you don't think he is good.) Most bad leads I have worked with are more than happy to have someone else volunteer to do the parts of their job that they don't like to do. And by getting the project done in spite of the lead and not because of him, you are also showing your worth when his problems become apprant to the senior managers. Working for a weak lead is a gift to someone who wants to be promoted. In some ways I have stretched myself professionally more when I had a poor boss than when I had a great one. You will grow a lot more if you take a negative and turn it into an opportunity than if you just get angry and depressed or run away immediately to a new job.
Also, coming to work early and working a lot of overtime is not the best way to get promoted; it is, however, a good way to be seen as irreplaceable in your current job and thus someone not to promote because he is too needed where he is.