Śrīmad-Bhāgavatam · Text 10.1.48
Who is speaking and story frame
मृत्युर्बुद्धिमतापोह्यो यावद्बुद्धिबलोदयम् । यद्यसौ न निवर्तेत नापराधोऽस्ति देहिन: ॥ ४८ ॥
mṛtyur buddhimatāpohyo
yāvad buddhi-balodayam
yady asau na nivarteta
nāparādho ’sti dehinaḥ
As long as he has intelligence and bodily strength, an intelligent person must try to avoid death. This is the duty of every embodied person. But if death cannot be avoided in spite of one’s endeavors, a person facing death commits no offense.
Read Śrīla Prabhupāda's purport on Vedabase.io