I had a similar thing with mine, here's what worked for me and got my toddler sleeping through within 3-4 nights and was a landmark achievement seeing as he was used to sleeping in our bed and now had to go in a cot in his own room:
As already mentioned, a consistent bedtime is key - it is the foundation for their bedtime routine.
The first thing I did was around 7pm put his pyjamas on and brush his teeth, then around 7:30pm say goodnight to everyone and I would take him upstairs. (Again, all part of a routine that teaches them to start winding down)
The first night, he was hysterical as soon as I walked past our bedroom and put him in the cot, so I started reading one of his favourite books again and again. Eventually, he realised that he couldn't hear me and would stop being upset so that he could listen to the story. This went on for about an hour or two and eventually he lay down exhausted and went to sleep.
Second night, same routine with pyjamas and teeth brushing at the same time. Got up to his cot and he started crying but would immediately stop when I started reading the story. After about 30 mins I asked him to lie down and would only carry on reading when he did so. Again this took a couple of hours but eventually he fell asleep.
Repeated this process for the next couple of nights and he eventually stopped moaning/crying about going to bed and would look forward to having a story read to him before going to sleep.
Again, I cannot stress this enough - consistency is absolute key to success with this.
After a few months we had a blip for a couple of nights where he would get upset again about going to bed so we bought a new night light for him and made it his job to turn the stars on and pick a song - this made it fun for him and he would look forward to going to bed.
He is 2 and a half now and we have absolutely no mither off him about bed time. 7pm he gets his pyjamas and some milk. Then has his teeth brushed, says goodnight to everyone and goes to bed for 7:30pm and sleeps through until about 7:30am in his own bed.
Obviously every child is different so it might not be a book or a night light that gets yours excited about going to bed but you will find something that works for you - just make sure it's consistent!!!