easy, easy.
You need access to the gate spell (9th level, cleric and wizard), and the craft rod feat.
Just make two rod of security (see DMG), and stay in your pocket paradise all the time. You will need to stay only one round on the prime per year (when switching from rod1 to rod2, so you will age 6 second every 365 days. Average longevity is multiplied by 5256000, so an elf (700 years usualy IIRC) may live 3 679 200 000 years before dying of old age. I think that's enough time to reach the divine rank 1, which will make you really immortal.