Elijah and John the Baptist had much in common though they lived about a thousand years apart. Both were fearless unto death in denouncing sin and injustice, especially in high places, and both were determined to restore in God's people faithfulness to God's will and law.
Four hundred years after Elijah, Malachi wrote chiding the Israelites for their lack of fidelity to God who had been so faithful to them. It was Malachi who built up the expectation of Elijah's return as a messenger-precursor before the day of the Lord to restore peace and harmony: "Know that I am going to send you Elijah the prophet before my day comes" (Mal. 4:5).
This conviction that Elijah himself was to come again is what caused the disciples to be confused. However, Jesus explained that there was to be a restoration of the spirit and power of Elijah rather than Elijah himself re-appearing. This was to be seen in John the Baptist's death which was similar to the murders of prophets of old. This death prefigured Jesus' own suffering and death. Jesus was a suffering Messiah, not to be confused with the conquering king they had come to expect.
Lord, "God of Hosts, bring us back; let Your face shine on us and we shall be saved" (Ps. 79:4).