In order to prepare the people of Israel to have faith in Jesus, God gave much testimony to John's parents, Zechariah and Elizabeth, who were greatly trusted by the people. And the people could see that the conception and birth of John the Baptist was God's doing (Luke 1). Undoubtedly, John was told much by his parents about his relationship with Jesus.
Yet, despite all this preparation, John the Baptist failed because of his disbelief and lack of wisdom. His personal ignorance and disbelief did not remain merely as his individual loss, but led to the disbelief of all the people and ultimately resulted in Jesus crucifixion.