Sa'd bin Abu Waqqas (May Allah be pleased with him) said:
The Prophet (ﷺ) said, "He who (falsely) attributes his fatherhood to anyone besides his real father, knowing that he is not his father, will be forbidden to enter Jannah."[Al-Bukhari and Muslim]. (ES)
App reference (ES): Book 18, Hadith 292 (ES)
Arabic/English book reference (ES): Book 18, Hadith 1802 (ES)