The gospel of Matthew was written around 85CE, 50 years after the Crucifixion. It was actually not written by the apostle Matthew. It was written for a Jewish Christian audience I'm Judea and contains a lot of known sayings to have been spoken by Jesus as well as pulling heavily from the work of Mark.
The apostle Matthew died around 60CE.
So, we have a book that was written as a second hand source borrowing heavily from a work that was written by a follower of Peter and of Paul but also never actually knew Jesus and filled in with common sayings that had been attributed to Jesus half a century after he died.
That brings us right back around to the fact that the Church was founded by Peter and by Paul. Not by Jesus.
And doesn't it seem odd to you that the Gospel of Thomas contradicts this idea of a church and is also a source of known sayings of Christ? The Gospel of Matthew was canonized, the Gospel of Thomas was not. You cannot ignore the self serving reasoning for this. The church chose sacred texts that legitimize it's existence, making subtle alterations as needed over the centuries. It excluded sacred texts that did not give it legitimacy or authority.
The Kingdom of God is inside/within you (and all about you), not in buildings/mansions of wood and stone. (When I am gone) Split a piece of wood and I am there, lift the/a stone and you will find me."
That is also attributed to Jesus. And again, if you look at the overarching sayings attributed to Jesus, it's clear his focus was on self work, he turned away from the accumulation of power and money, and he preferred connecting humans to each other than by connecting them to that spark of the divine within. Not building institutions that inevitably will wield power over people, control their lives, and cause suffering.