Elijah was taken up to the 1st heaven before his death, yes.
But it does not mean he did not return to Earth and die after that.
II Chronicles 21:12-15 has an interesting account of a letter written by Elijah after his return to Earth.
Otherwise, Jesus would be contradicting himself in John 3:13, a verse I quoted already to another here.
John 3:13 A
nd no man hath ascended up to heaven, but he that came down from heaven, even the Son of man which is in heaven.
The author of Hebrews made it clear for people like Enoch and Elijah in chapter 11.
13
These all died in faith, not having received the promises, but having seen them afar off, and were persuaded of them, and embraced them, and confessed that they were strangers pilgrims on the earth.