Qurtubi writes:
وقال : إلى يوم يبعثون ولم يتقدم ذكر من يبعث ; لأن القصة في آدم وذريته ، فدلت القرينة على أنهم هم المبعوثون
He said: 'until the Day they are resurrected' and did not first mention who will be resurrected. Since this story is about Adam and his children so context evidences that they are the ones who will be resurrected.
— Tafsir al-Qurtubi
AFAIK nowhere is it explicitly stated that Adam (عليه السلام) was supposed to live in paradise forever at that time - rather you are wrongly assuming that. When creating Adam , Allah says to the angels that His plan is to place humanity on 'earth', which is evidence that Adam was going to leave paradise eventually:
وإذ قال ربك للملائكة إني جاعل في الأرض خليفة قالوا أتجعل فيها من يفسد فيها ويسفك الدماء ونحن نسبح بحمدك ونقدس لك قال إني أعلم ما لا تعلمون
And [mention, O Muhammad], when your Lord said to the angels, "Indeed, I will make upon the earth a successive authority." They said, "Will You place upon it one who causes corruption therein and sheds blood, while we declare Your praise and sanctify You?" Allah said, "Indeed, I know that which you do not know."
— Quran 2:30
Further the temptation that Satan uses against Adam is one of Eternity:
فوسوس إليه الشيطان قال يا آدم هل أدلك على شجرة الخلد وملك لا يبلى
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
Which indicates that both Adam and Satan knew that Adam was not going to live there forever by default.
Eternity in paradise only applies to the humans who would enter it as a reward.