what happen to Goshalak after he died
According to Jainism, Goshalak (also known as Gosala Mankhaliputra) was a contemporary of Lord Mahavira and initially his companion. Later, Goshalak parted ways and became the founder of the Ajivika sect, which held different philosophical views.
Jain scriptures describe that Goshalak attained Pariṇāma-maraṇa (death due to the fruition of karmas) after being afflicted by a disease caused by his own karmas. It is mentioned that due to his false teachings and wrong views (mithyātva), Goshalak did not attain liberation (moksha). Instead, after his death, he was reborn in a lower state of existence (naraka, or hellish realms), as a result of his accumulated karmas and false beliefs.
References can be found in Jain texts such as the Bhagavati Sutra and commentaries on the life of Mahavira, where Goshalak’s end is described as an example of the consequences of wrong faith and false teachings.