It Happens
Unfortunately we don't always get the credit we deserve, or management will give credit to the people directly under them, who do not necessarily have the power (or honesty) to bestow some of it upon you. It's an organizational thing: by way of the organigram, it should trickle down; except a few people act as dams.
I'm afraid that's what happened to you. Most likely, that senior tech did deserve a bonus and promotion, but you were too much below the radar for the people above.
Basically, this happened:

Market Yourself
It's not because you already have a job that you should stop selling yourself.
Ask for a Raise!!!
People have a hard-time understanding this: they won't come to you naturally.
And if they do, it's either one of these 2 cases:
- they emit raises to have control over the increases, not you (you feel happy and recognized, you don't need to request one, and would feel bad about asking more).
- you work in the most awesome company ever created (please send me the address).
Do ask for a raise. Learn to keep track of what you do. Keep track of bug countrs, commit logs, real achievements. Cover your ass is a real rule in the world.
Request a raise means different things:
"I want more money and am greedy"
Except that's what you think first, but it's not necessarily what they think first.
"I want what I deserve, or I'll get it somewhere else"
If you ask for a raise, it means you are conscious that there is something better out there.
"I am unhappy"
And the obvious implication is that you will not perform as well.
Asking for a raise implies a status change. You get more money, but also more scrutiny. People will look to make sure that you deserved it, after the fact. Be prepared for this as well.
Your position in a company is a fluid thing: it changes and evoles. Take control of that and don't just let things happen.
Raise the Issue
You mention your boss... how come he didn't notice this issue? Or did he, but didn't do anything about it? It's his reponsibility to make sure the work of his subordinates his well-advertised and respected.
If he's unaware of your problem, talk it over with him. Make it clear that this is an issue, that it affected you.
Make you'll come across as a diva (maybe you are, for all I know), but IT DOESN'T MATTER. What matters is that your boss will notice that one of his employees is unhappy, and that it is a problem for him and others.
Look for Alternatives
You're young, you're employable, and you're good.
Why would you think you need to stay where you are? Maybe this was just your first experience, and opportunity to make your teeth on something. Now, you can go out and reach for more.
It's sometimes easier to get a career break by actually taking a career break, in one sense. So look for other jobs, brush over your resume, sell yourself well, and attempt to reach for the next job slightly up the ladder that you are interested in. And state your salary expectations (well, advertise higher than your salary expectations, actually) to agencies.
Be careful about your privacy. It's best, at this stage, that nobody in your company knows that you are looking. But if they call you up on it, then so what? It also shows that there's an issue and they need to address it, or things will change. They can't control that.
Basically, it allows you to do this:

Keep it Professional, and Civil - Don't Burn Bridges
- DO NOT whine.
- DO NOT get too passionate.
DO NOT get personal.
DO stay professional.
- DO stay polite.
These are professional, business relationships. You will most likely need references from your current company when you decide to go somewhere else. Do not burn bridges.
Or, this will happen:

(Unlikely though, as that would mean your boss tries to keep you while knowingly making you unhappy... Surely, he'd know no good can come from that. Or run for the hills, now!)
About Burn-Out
I haven't actually addressed this...
While it doesn't sound to me like you've burned out and are simply demotivated, I would say that there no age requirement or limit to burn out. It can happen at 23 like it can at 77. The good thing is that you can recover from it at 23 and look past it. It's harder at 45, for instance, to look for alternatives.
Don't overwork yourself. Don't do jobs for extended periods of time that suck the life and the joy of programming out of you. It doesn't seem like you were using these, so I doubt you actually burned out.
You were burned, but in a different way. Consider it just being a lesson. Now get back to work, get that raise or recognition, and remember to have fun coding. And if it's tough at the moment to have fun doing it, I'd even advise to pick up small projects that make it fun at the workplace (develop a tool to make something easier, something like this).
Pictures are courtesy of Dilbert.com and Scott Adams.