Hello, I am Rafael. Thanks for asking your question - I'm here to support you. (Information posted here is not private or confidential but public).
I am very sorry to know about this overwhelming and frustrating situation.
Your story shows how he was not truly honest towards you, and how his behavior and commitment totally changed once you decided to work on getting pregnant
I do believe you were right setting boundaries and confronting his behaviors, totally inconsistent with your commitment. It is very sand and painful but real, necessary for you to take good care of yourself since you need somebody who is truly able and willing to match your core needs and expectation in the short term and in the long run too.
Does it make sense?
It is very sad but his behaviors, regardless of what motivates them, show that he effectively does not care about taking care of this relationship, and that this painful reality became obvious as soon as you decided to start working on getting pregnant as you agreed before. He stopped avoiding-refusing sex, while keeping an active sexual activity through masturbation and pornography, and then by directly telling you he does not have a baby as a priority in his life at all.
He continues not to be honest and when basic respect, honesty ad caring are not preset in a relationship, it is impossible for it to grow as a healthy and fulfilling one. You could try very hard to understand his deepest reasons to act this way, but it could become an endless process, since only he knows the answers, and as long as he does not choose to be honest, you would never know.