John also said that "every spirit that doesn't confess that Jesus Christ has come in the flesh is not of God.
And this is the spirit of the Antichrist, which you have heard was coming, and is now already in the world" 1 John 4:3.
This confirms the other Scriptures that tell us that the Spirit of God reveals the truth to us as He did to Peter.