2 years old is a hard age... for sleep. As you can tell.
The main thing is to have a CONSISTENT routine. Everynight.
AND, allow him to "wind-down" pre-bed. Because kids naturally have a lot of 'energy' to expel, before bed.
For me, it takes me about 1/2 hour to wind down my kids, before bed or a nap.
We make everything quiet, we only leave on 1 dim light, change into jammies, brush teeth, then sit down to a book or a calm mellow "Little Bear" video. Then at the same time, I give my kids a verbal forewarning... ie: "sleep time in 10 minutes" etc. What I found is that kids don't like to be or feel 'rushed.' So I give them mellow verbal warnings about it. Then they know what is coming up.
Also, my son who is now 2.5 years old, has his 'own' routine before he will actually go to bed and lie down...which is he likes to go upstairs and hang-out with Grandma for a few minutes. I learned not to 'rush' him or hurry him with this.. as he really enjoys it and it's something he created on is own for his own 'routine' before bed. Then, when he is done after about 15 minutes, I call him and he comes downstairs, and will lie down. So, I "let" him do this, in other words. I found it helps him to settle down as well.
For my daughter at that age... it was hard. She is a different personality. BUT, she went through a stage where SHE liked to 'decide' where to sleep. We did not FORCE her to be IN her bed... but rather for us, the main thing was that she actually settled down, then slept and got sleep. Comfortably. So... sometimes she'd just want to sleep on the floor of her bedroom. Fine with us. Or, she'd want to sleep all curled up on the chair in her room. Fine. Or, she'd fall asleep in a pile of blankets (she called it her 'nest') which she made on the floor of our bedroom. Fine. We did not have a problem with any of that... the main thing for us is she slept. It was a phase, and we knew it.
Then, we also have a floor futon on the floor of our own bedroom... and she sleeps there too sometimes. Fine. No problem. And I am also one of those "co-sleeper" parents. So no problem for me. And I co-sleep if need be.
ALSO, in tandem with all of this and their age... well, at this age they also develop night-time 'fears' or fears of the dark or of being alone, or have night mares. All of this makes them not want to sleep, or makes them feel uncomfortable. So, that too is a phase. And every parent is different of how they can help or let just let them cry. For us, we just comfort our kids through it. We don't like to have them cry, just to go to sleep. It's fine and works for us.
At night, we make everything dark and quiet. My kids know the 'rules.' Nothing can be turned on. If they get up and open the door or wander around (which my son sometimes does), then fine... we let him get out his yah-yahs and verbally 'coach' him that when he is done... go to bed and Mommy is waiting etc. My son is rational about it, and once he does get out his yah-yahs, he does go back to bed. He knows himself, and through observation, we know him and what he 'needs' to do, before bed. He is this way. Thus, we don't usually have a lot of icky 'drama' before bed or yelling. We go with their personality and cue into them... then, the 'flow' of bedtime is more pleasant and peaceful.
But yes, we have a distinct bed "time" and routine. The SAME every night. The kids know this like auto-pilot. My daughter being the oldest, if my son gets loud at bedtime and grumpy... it doesn't bother her or wake her up... she knows its just her brother. So she ignores it.
In any event, 2 is a hard age for sleep. It's a transition age. They are having 'growing pains' and it's a phase. But not an easy phase for them either. Not just the parent.
All the best, I didn't have any 'answers' just some thoughts on what we do, and have success with with our kids,
Susan