Look OP, something very similar happened to me. Thought I'd found an amazing man, totally in love, felt like a movie it was so wonderful. He knew I had children and was okay with that.
But he changed his mind. He ended it and said didn't think someone with children was for him.
At first I was like you- so hurt and confused. He always knew I had kids after all!
And it's natural to be hurt and confused. Especially if he was like my guy who was giving it the big ones about me being the love of his life, all future bullsh*t.
But as others have said. He's allowed to change his mind. People change their mind about relationships and lots of other things all the time.
Maybe at the time he said it, he meant it. Or thought he did.
Maybe reality set it and he realised it's not for him.
Maybe it's not the kids at all, and it's something else and this is an easy exit for him.
Not to be blunt, but maybe he's lost feelings/ or doesn't like you as much as he did at the start. Happens a lot. Nothing to do with you, just the way it is sometimes.
Thing is- you'll never properly know. You could keep at him for an answer but it may not make you feel better/you may not get the answer you want.
It could just be he said a lot of things, that he thought he meant at the time. A lot of people do unfortunately at the start of exiting new relationships.
As hard as it is, and as hurt as you may be. You can't convince him into it. He's told you it's done.
The best thing you can do is hold your head up high, he's done you and your child a favour in the long run.
You will be hurting but you will start to feel better with time.