1. What is meant by eternal
Right now you are thinking that eternal means that the physical body will never die. However this is a wrong notion. The BODY IS ALWAYS MORTAL. The physical body is subject to birth, decay and death. There is no body that can live forever (except in case of certain incarnations which are supposed to exist forever).
Gita 2:18
The material body of the indestructible, immeasurable and eternal living entity is sure to come to an end; therefore, fight, O descendant of Bharata.
Then what is eternal?
Eternal implies that the soul becomes eternal. However, the soul is always eternal! The soul is never subject to death or dissolution!
Gita 2:16, 18
In the unreal there is no duration and in the real there is no cessation; indeed the conclusion between both the two has been analyzed by knowers of the truth.
But know that by whom this entire body is prevaded (Atma), is indestructible. No one is able to cause the destruction of the imperishable soul.
This is so confusing. If body always dies and soul is always eternal then what is meant by immortality?
Right now we think we are the body. However this is a wrong association. We are not the body, we are the immortal soul.
Shri Adi Shankaracharya says in Nirvana Shatakam:
Mano buddhya-hankara chittani naham
Na cha shrotra jihve, na cha ghrana netre
Na cha vyoma bhumirna tejo na vayuhu
Chidananda rupah shivoham shivoham
I am not the mind, intellect, thought, ego, or some form of the supreme being; I neither have ears, nor tongue and I neither have nose (nostrils) nor eyes; I am not the sky, earth, light or the wind; I am the fortunate, joyful, supreme being who is the very emblem of truth, knowledge and eternal bliss. I am consciousness and bliss. I am Shiva, I am Shiva.
So immortality implies removing this association from body and realizing that we are the soul.
According to Vaishnavas, this self-realization (called Kaivalya) is not the Ultimate liberation (Moksha). There is a level above it called reaching Vaikunta. But this is a separate discussion. Whatever you believe as the highest level or not, the physical body is never eternal and self-realization leads to immortality according to Advaitic beliefs (because the soul has always been eternal).
Thus this self-realization makes one immortal.
2. What about Asuras?
The Asuras performed rigorous tapas, they meditated on the Lord. Although they had evil intentions they did pray to God.
That is why, after being killed by the Lord Vishnu, they reached Him!
In other words, they were granted IMMORTALITY! It is just that they were not granted bodily immortality!
In this beautiful answer, the user @BeHappy explains how the Asuras worshipped Lord Vishnu in the mode of enimity and therefore they reached Him:
So Ravana was no ordinary soul. He was previously one of the two gatekeepers at Vishnu's abode Vaikuntha. Due to stopping the four Sanat kumaras they got cursed and had to take birth in demonic families as the Lord had desired:
The Lord replied: O brāhmaṇas, know that the punishment you inflicted on them was originally ordained by Me, and therefore they will fall to a birth in a demoniac family. But they will be firmly united with Me in thought through mental concentration intensified by anger, and they will return to My presence shortly. [SB - 3.6.26]
Some more excerpts from that answer:
kāmaṁ krodhaṁ bhayaṁ sneham aikyaṁ sauhṛdam eva ca
nityaṁ harau vidadhato yānti tan-mayatāṁ hi te [SB - 10.29.15]
Meaning
Persons who constantly direct their lust, anger, fear, protective affection,
feeling of oneness and friendship toward Lord Hari are sure to become absorbed in Him.
Therefore in conclusion,
If you pray to God with good intentions, you will reach God in a good way. If you pray to God with bad intentions, you will reach God in a bad way (eg. Ravana, Kamsa. Bad in the sense that they were used as bad examples of reaching God by opposing Him). However you will reach God by sincerely thinking about Him.