I assume you mean the door being closed on our side, not on God's side.
Where, then, did Elijah go?
Now when the LORD was about to take Eli'jah up to heaven by a whirlwind, Eli'jah and Eli'sha were on their way from Gilgal...
And as they still went on and talked, behold, a chariot of fire and horses of fire separated the two of them. And Eli'jah went up by a whirlwind into heaven. (2 Kings 2:1,11)
Heaven, as you know, can be translated as the atmosphere, the realm of God, the sky, etc. A whirlwind came from the sky and took Elijah away up into the sky...and then deposited somewhere else on earth.
Why? Because years later Jehoram got a letter from Elijah:
2Ch 21:12 And a writing came to him from Elijah the prophet, saying, So says Jehovah, the God of David your father, Because you have not walked in the ways of Jehoshaphat your father, nor in the ways of Asa king of Judah,
Apparently God wanted Elijah out of the way for whatever reason and caused a whirlwind to take him far away from where he was...