Why are Hindu gods immortal?
Hindu Gods like Mahaganapati, Paramashiva, Parashakti, Mahavishnu, etc. are truly immortal because they are full forms of Saguna Brahman, the inherently existent Ultimate Reality. They transcend distinctions like death and life, or even time. They are. For them to “die” would be like a child putting on a play; They would still exist just as much and would be “alive” again whenever They felt like it. They are truly omnipotent and cannot be killed or destroyed because there is no superior agent that could act upon Them. Even the laws of physics and causality are subordinate to Their will.
If by “Hindu gods” you mean Devas like Indra and his 330 million followers, they are immortal because they drink Amritam, the Nectar of immortality which was obtained from the churning of the otherworldly Milk Ocean in primordially ancient times. This technique does not make them truly immortal, but just very long-lived. “Normal” Devas live a full lifespan of 36,000 Earth-years. The thirty-three Trayastrinshata Devas, the greatest lords among them, live much longer, up to millions of years.