Tafsir of 18:76 Ma'arif al-Qur'an
قَالَ إِن سَأَلْتُكَ عَن شَىْءٍۭ بَعْدَهَا فَلَا تُصَـٰحِبْنِى ۖ قَدْ بَلَغْتَ مِن لَّدُنِّى عُذْرًا ﴿٧٦﴾
This commentary covers verses 18:74 to 18:76.
We now move to the sentence: حَتَّىٰ إِذَا لَقِيَا غُلَامًا (until when they met a boy -74). The word: غُلَام (ghulam) in the text is used for a minor boy in the Arabic usage. This boy killed by al-Khadir (علیہ السلام) was a minor - as corroborated by Sayyidna Ibn ` Abbas ؓ and most commentators. Further on, when the words: نَفْسًا زَكِيَّةً (innocent person) were used for him, that too supports the view that he was a minor. The reason is that زَكِيَّةً (zakiyyah) means 'free of sin' and it can be either the attribute of a prophet or a minor child who faces no accounting for what is done by him and no sin is written in his Book of Deeds.
Source: Ma'arif al-Qur'an — Mufti Muhammad Shafi. Licence: Maktaba-e-Darul-Uloom; confirm