In Matthew 11:14, it appears that Jesus is saying that John the Baptist is actually Elijah.
Matthew 11:14 (NKJV)
14 And if you are willing to receive it, he is Elijah who is to come.
This is also seen in Matthew 17:12, Mark 9:13 and John 21:
Matthew 17:12 (NKJV)
12 But I say to you that Elijah has come already, and they did not know him but did to him whatever they wished. Likewise the Son of Man is also about to suffer at their hands.”
Mark 9:13 (NKJV)
13 But I say to you that Elijah has also come, and they did to him whatever they wished, as it is written of him.”
In John 1:21, John states he is not Elijah:
John 1:21 (NKJV)
21 And they asked him, “What then? Are you Elijah?”
He said, “I am not.”
“Are you the Prophet?”
And he answered, “No.”
In Matthew and Mark, Jesus is referring to John as the fulfillment of Malachi 3:1 and 4:5-6 but not the literal Elijah or a reincarnated Elijah.
Malachi 3:1 (NKJV)
The Coming Messenger
“Behold, I send My messenger,
And he will prepare the way before Me.
And the Lord, whom you seek,
Will suddenly come to His temple,
Even the Messenger of the covenant,
In whom you delight.
Behold, He is coming,”
Says the Lord of hosts.
Malachi 4:5-6 (NKJV)
5 Behold, I will send you Elijah the prophet
Before the coming of the great and dreadful day of the Lord.
6 And he will turn
The hearts of the fathers to the children,
And the hearts of the children to their fathers,
Lest I come and strike the earth with a curse.”
So, what do we say about John 1:21 where John says he is not Elijah? It is probably safe to assume that John didn’t understand the questions. John could have taken the question literally and answered it in truth by saying he is not physically Elijah when the question could have been asked if he was a “type of Elijah”.