The Jews sent priests and Levites to John to ask him who he was, “And he confessed, and denied not; but confessed, I am not the Christ.
21 And they asked him, What then? Art thou Elias? And he saith, I am not” (John 1:20).
Later, when Jesus was returning from the Mount of Transfiguration, He commanded Peter, James and John not to discuss what they had just seen until He was risen from the dead. Well, Elijah had been with Jesus on the Mount of Tranfiguration, but Jesus told them not to tell anybody. His instructions to keep it quiet raised a question in the minds of the apostles about a prophecy. Zech 4:5 distinctly promised that Elijah the Tishbite would return. They wondered why He would want to keep it quiet if the prophets said it would happen, so they asked, “Why then say the scribes that Elias must first come?” (Mt 17:10). Jesus then answered with two apparently contradictory statements. He said
1) Elijah will truly come first and restore all things before the great and dreadful day of the Lord at the end of the world (Mt 17:10).
2) But–“Elijah” has come already, and they knew him not, but done unto him (John) whatever they wanted in Jesus’ day (Mt 17:11)
The statements appear to be contradictory because (1) says Elijah’s coming is yet future while (2) says he has come already. However, Jesus evidently refers to two separate events. (2) evidently refers to the type that John provided, because John was not literally Elijah. What you have, then, is this. John and Jesus were a type of the Second Coming. John and Jesus were the two witnesses that testified of the first coming of the kingdom. They served as a type of the two witnesses at the end of the world (Enoch and Elijah) that will testify of the coming of the kingdom in its fullness at the Second Coming. While the real Elijah will return “before the coming of the great and dreadful day of the LORD” (Mal 4:5), the typical Elijah came in Jesus’ day. Jesus referred to both the typical Elijah (John–Mt 17:11) and the real Elijah (Elijah the Tishbite–Mt 17:10) in His conversation with the apostles as they came down off the the Mount of Transfiguration.
Jesus’ statement does not contradict John’s. The priests wanted to know if John was Elijah the Tishbite returned to earth. He told them he was not. That was a truthful answer. In Jesus’ conversation with the disciples on the Mount of Transfiguration, Jesus said John was Elijah. Jesus was also truthful, but He had reference to John serving as a type of Elijah. The apostles figured out that Jesus had reference to John as a type of Elijah, even though they had seen Elijah the Tishbite with their own eyes a few minutes before.