It was called so by Satan to deceive Adam, his lure was that by eating it he would remain in paradise forever.
فوسوس إليه الشيطان قال يا آدم هل أدلك على شجرة الخلد وملك لا يبلى
Then Satan whispered to him; he said, "O Adam, shall I direct you to the tree of eternity and possession that will not deteriorate?"
— Quran 20:120
وقال ما نهاكما ربكما عن هذه الشجرة إلا أن تكونا ملكين أو تكونا من الخالدين
(Satan) said, "Your Lord did not forbid you this tree except that you become angels or become of the immortal."
— Quran 7:20
Other Abrahamic religions simply call it the Tree of Life.
It is the same thing, as 'life' there means 'eternal life':
And the Lord God said, Behold, the man is become as one of us, to know
good and evil: and now, lest he put forth his hand, and take also of
the tree of life, and eat, and live for ever
— Genesis 3:22