Was John the Baptist Elijah? This should be straightforward, as John the Baptist explicitly says that he isn't:


  John 1:19-21 (ESV)
   19 And this is the testimony of John, when the Jews sent priests and Levites from Jerusalem to ask him, "Who are you?" 20  He confessed, and did not deny, but confessed, "I am not the Christ." 21 And they asked him, "What then? Are you Elijah?" He said, "I am not." "Are you the Prophet?" And he answered, "No."   


However, Jesus has something to say about the matter, too:


  Matthew 11:13-14 (ESV)
   13  For all the Prophets and the Law prophesied until John, 14 and if you are willing to accept it, he is Elijah who is to come.   


So was he Elijah or not? Why do Jesus and John say such different things?
Malachi had prophesied that “Elijah” would prepare the way for the
  Messiah (Mal. 3:1; 4:5). He did not actually
  imply only a literal reappearance of Elijah, and John’s earlier denial
  that he was Elijah (John 1:21) was probably an attempt to correct a
  popular belief that Elijah himself would reappear. Before John’s
  birth, he was designated as the one who would minister in the “spirit
  and power of Elijah” (Luke 1:17), thereby fulfilling Malachi’s
  prophecy.


Crossway Bibles: The ESV Study Bible. Wheaton, IL : Crossway Bibles, 2008, S. 1842


  John the Baptist, preacher of repentance and faith, was accordingly
  the Elijah who was to come. Like the Elijah of old, John too was a
  preacher of repentance. The two resembled each other also in the
  sudden character of their appearance, the incisiveness of their
  message, and the simplicity of their life. See on Matthew 3:3. True, John was
  not literally Elijah (John 1:21), but inwardly he was indeed, for “he
  went forth in the spirit and power of Elijah” (Luke 1:17), and was
  therefore called Elijah by no one less than Jesus himself (Matt.
  17:12).


Hendriksen, William ;   Kistemaker, Simon J.: New Testament Commentary : Exposition of the Gospel According to Matthew. Grand Rapids : Baker Book House, 1953-2001 (New Testament Commentary 9), S. 490


  When asked: “Are you Elijah?” John clearly answered: “I am not.”
  (John 1:21) It had, however, been foretold that John would precede the
  Messiah “with Elijah’s spirit and power.” (Luke 1:17; Malachi 4:5, 6)
  In other words, John the Baptizer was Elijah in the sense that he
  carried out a work comparable to that of Elijah.


Watchtower 2001 5/1 Box on p. 22 DOES THE BIBLE TEACH REINCARNATION?