No, Jesus didn't say that John was like Elijah, he said this was Elijah. But John said he wasn't Elijah. Because John was John, but the Spirit of Elijah was in him ministering to him and through him, that's why Jesus said that John was Elijah yet John said he wasn't. Elijah is one of the ministering Spirits of God, and his Spirit is holy because he comes from God.
Paul speaks of the ministering spirits, these are all holy because they come God through Christ and they only speak what they are given of God to speak!