Try your best to put what you have been taught on the shelf and re-read the scriptures about the event.
Start with the question Jesus asked.
Matt 16: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? KJV
They answered and then Jesus asked another question.
Matt 16:15
He saith unto them, But whom say ye that I am? KJV
Peter answered;
Matt 16:16
And Simon Peter answered and said, Thou art the Christ, the Son of the living God. KJV
Jesus responded.
His response is the "subject" of what else He said in the conversation.
His response was about the source of what Peter said.
His response was that Peter did not learn that Jesus was the Christ, the Son of the living God from men.
Matt 16: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. KJV
Jesus said that Peter learned that Jesus was the Christ, the Son of the living God from "my Father which is in heaven".
Then the verse that you believe I interpreted incorrectly.
Matt 16: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. KJV
The word used for Peter is petros, masculine in gender, meaning a detached large fragment of rock.
The "rock" Jesus then spoke about.
The "rock" He would build His church on.
Is another word.
That word is petra, feminine in gender, a massive rock.
Two different rocks.
Peter, a detached fragment of rock.
Petra, a massive rock, on which Jesus would build His church.
The Petra, large massive rock is the subject Jesus was talking about.
That subject being knowledge revealed to men by the Father in heaven.
Peter is not the massive rock the church was built on.
You are Rock [petros, masculine in gender, a detached but large fragment of rock], and upon this massive rock [petra, feminine in gender, feminine demonstrative pronoun cannot go back to masculine petros; petra, a rocky peak, a massive rock] I will build my Church.