From Sahih Muslim (Hadith 6767):
Ubayy b. Ka'b reported that Allah's Messenger (ﷺ) said:The young man whom Khadir killed was a non-believer by his very nature and had he survived he would have involved his parents in defiance and unbelief
Reference: Muslim 6767