He wasn't talking about building the congregation on or by Peter. He was saying the belief that Jesus is the Son of God is what gets a person saved, thereby building the congregation by their salvation:13 When Jesus came into the coasts of Caesarea Philippi, he asked his disciples, saying, Whom do men say that I the Son of man am?
15 He saith unto them, But whom say ye that I am?
16 And Simon Peter answered and said, Thou art the Christ, the Son of the living God.
17 And Jesus answered and said unto him, Blessed art thou, Simon Barjona: for flesh and blood hath not revealed it unto thee, but my Father which is in heaven.
18 And I say also unto thee, That thou art Peter, and upon this rock I will build my church; and the gates of hell shall not prevail against it.
1 John 5:13 KJV These things have I written unto you that believe on the name of the Son of God; that ye may know that ye have eternal life, and that ye may believe on the name of the Son of God.
It's believing that Jesus is the Son of God, also known as the Messiah/Christ/Redeemer/Savior that saves and builds the church, the congregation of the saved.