John the Baptist wasn't Elijah really but he came
in the "spirit and power of Elias." That he wasn't
Elijah in person is certain from John 1:21.

"And they asked him, What then? Art thou Elias?
And he saith, I am not. Art thou that prophet?
And he answered, No"

The Jews had asked John if he were Elijah, and
if anyone knew for certain the answer to such a
question it would be John the Baptist. But he denied
that it was true.