It is easy to see why many people thought that John the Baptist was the second coming of Elijah. Similar fire-and-brimstone preaching style and content (for Elijah’s case, the fire is literal), similar fashion style (“a garment of hair and a leather belt around his waist”, 2 Kgs 1.8), and similar situation (despotic kings in Ahab and Herod). Indeed, you could argue that John might deliberately portray himself as an Elijah-like prophet. Elijah was ascended into heaven on the Jordan river, and John baptized the Israelites in the same river. Elijah ended and John started (i.e., resumed Elijah’s prophethood) in the Jordan river.
(Although, of course, in the original narrative Elijah was succeeded by Elisha. So, I guess we can call John as the successor of Elijah in the eschatological sense, as he was the ‘final’ Elijah to come. And only then Elijah could die, as John the Baptist was beheaded by Herod. Elijah’s task has been completed.)