And verse 46 says:
(46) These will go away into eternal punishment, but the righteous into eternal life.”
The righteous will have eternal life, the unrighteous will therefore not have eternal life. The punishment of the unrighteous is death, eternal death (Romans 6:23). When someone is cast into a fire they die.
Daniel 12:2, talking of the resurrection, says:
(2) Many of those who sleep in the dust of the earth will awake, some to everlasting life, and some to shame and everlasting contempt.
Or as the YLT translates it:
(2) 'And the multitude of those sleeping in the dust of the ground do awake, some to life age-during, and some to reproaches—to abhorrence age-during.
The dead (unconscious, having no thoughts, hence described as asleep and awaking to life when resurrected) will be restored to life to either live forever, or to die again. Those judged to be unrighteous and unworthy of life will be remembered with abhorrence. They will not be alive, living in a fire! The word
dera’own, that is translated as abhorrence or contempt, is only used twice - the other occurrence is the last verse of Isaiah:
Isaiah 66:24 (KJV):
(24) And they shall go forth, and look upon the carcases of the men that have transgressed against me: for their worm shall not die, neither shall their fire be quenched; and they shall be an abhorring unto all flesh.
Isaiah 66:24 (MKJV):
(24) And they will go out and see the dead bodies of the men who have sinned against Me; for their worm will not die, nor will their fire be put out; and they will be an object of disgust to all flesh.
The context is God's final judgement (WEB):
(15) For, behold, Yahweh will come with fire, and his chariots will be like the whirlwind; to render his anger with fierceness, and his rebuke with flames of fire.
(16) For Yahweh will execute judgment by fire and by his sword on all flesh; and those slain by Yahweh will be many.
(23) It shall happen that from one new moon to another, and from one Sabbath to another, all flesh will come to worship before me,” says Yahweh.
(24) “They will go out, and look at the dead bodies of the men who have transgressed against me; for their worm will not die, nor will their fire be quenched, and they will be loathsome to all mankind.”
It clearly states that all those living will worship God, the rest God will have killed, and the living will look upon the bodies of the dead with abhorrence/contempt.
As Paul describes it in 2 Thessalonians 1:7-9 (WEB):
(7) ... when the Lord Jesus is revealed from heaven with his mighty angels in flaming fire,
(8) punishing those who don’t know God, and to those who don’t obey the Good News of our Lord Jesus,
(9) who will pay the penalty: eternal destruction from the face of the Lord and from the glory of his might,
Destruction is not eternal life, not even if it is a life of torture - it is eternal death
(sleep forever).