How to get toddler to sleep in own bed

My daughter will be 2 in February. She can climb out of her crib, so we took the front off and made it into a toddler bed. But she will NOT sleep in it. The moment we shut the door, she goes right up against the door and SCREAMS HER HEAD OFF for at least 40 minutes, no matter how tired she is. We have tried every trick in the book. We have even tried sitting in there with her. We have put a baby gate instead of the door, that made it worse. She never did this in her crib, she would always go to bed right away. But now, she just won’t. She’s been doing this going on 4 months now, every single night. I don’t know what else to do! She just doesn’t understand the concept of stay in bed. We have given her music, night lights, baths, books, cuddles, etc. we even tried to punish her by lightly tapping her hand when she got out of bed.