Actually, he didn’t. At least not in the way we have come to think of it.
The word Jesus uses in Matthew 16:18 is Ekklesia, which is not a religious word at all, even though we now seem to interpret it that way. The Ekklesia was a group of citizens in Greek culture, who were called together to administer the cultural and commercial life of a city. In a Jewish context they would have been the elders who sat in the city gates, upheld the laws and traditions of the city, and regulated its commercial and social life.
The implication of Matthew 16:13–19, is that as those who like Peter wake up to and align their hearts with the true nature of Jesus, will be the foundation of a whole new spiritual culture (the Kingdom). These people will influence how that spiritual culture is established and functions, in a way analogous to the way the Ekklesia influences the establishment and functioning of a city. This new spiritual kingdom or culture, because it is founded on an ‘Ekklesia’ defined by revelation and heart alignment, will be so powerful and transformative that it will not only impact all of life, but will even reach beyond the gates of Hades (death).
The religious trappings that gradually accumulated around the gatherings of early believers, especially after Constantine legalised Christianity, were primarily derived from Jewish temple worship, and the structures and culture of the Roman Empire. Pagan Christianity by Frank Viola and George Barna is a good and well-researched resource on this.