And if you are willing to accept it, he is Elijah who is to come. Here he shows John's greatness as far as the distinction between present and future is concerned. For Elijah was the Lord's precursor; hence Malachi (4:5): "Behold, I will send you Elijah, the prophet...," and John is Elijah. But what is the Lord saying? For when John was asked if he was Elijah, he said that he was not. But this refutes a heresy which posited transmigration of souls, namely, that the soul went from one body and entered another body; therefore Elijah's soul had entered John, so they said. But this opinion is fals...e, because he denied that he was Elijah. But Christ said that John was Elijah on account of three similarities: first, because, as one angel is said to be similar to another angel, because they are equal in office, so Elijah and John were equal in office, because both were precursors: "He will go before the face of the Lord to prepare his ways" (Lk 1:76). Also as to manner of life, because he led an austere life (1 Kg 19:6). Again, as to persecution, because as he was persecuted by Jezebel, so John by Herod. Hence if you are willing to accept it in the sense in which it should be taken, he is Elijah.
Source: Commentary on Matthew