THats right best to do it whilst he is young, make sure he is tired and hasnt slept a lot during the day, if he has slept longer then keep him up for a while, read him a story to calm him or sing him a song, give him a cuddle and leave the room, he will yell, you may have to plug your ears, you can go to soothe him once, then let him get on with it. It may take a few nights but he will get the message.
Wow, I know how you feel! You need to let him cry it out. I know it's hard but after a few days (hopefully) he'll be able to self sooth himself back to sleep. I'm still in the process of getting my daughter into her crib. But i've gone from bed to the bouncy chair (which of course is right next to the bed) lol....and hopefully soon to her own bed! It's a process and takes time but don't give in. And DO IT NOW! or you'll be sleeping with a 6 year old before you know it! Good luck!