There are several things that you can try.
Ask him what would make him feel safe from the dinosaurs... perhaps a stuffed dinosaur friend or dragon or something that is specifically his friend who could protect him? When my daughter was afraid of monsters under her bed, she picked out a stuffed monster who could live under there, and not let any other monsters in. When my son was plagued by nightmares, I took a little stuffed frog of his and told him that his name was ribbit, and that he is a good dream frog. Any time he had nightmares, ribbit would enter his dreams and help him change them to good dreams. He started bounding ribbit on his head before going to sleep "to put good dreams in there." He's 10 now, and still sleeps with ribbit sometimes. Figure out some way of making him feel safe in his room. If it's really a problem, you might want to put a small mattress or something in your room on the floor for him to crawl into until he's done with this phase, if having him in your bed is really a problem.
At the same time, you might want to consider starting a sticker chart -- a sticker for every day he stays in his bedroom until X time. When he has done it some small number of times, he gets a small reward. Then more times for a larger reward, and maybe 2 weeks gets something he really wants, or however much positive reinforcement you think he needs.