Sunan Ibn Majah, Volume 3, Book 20, Hadith 2610 (DarusSalam) ⓘ
It was narrated that Abu Uthman Nahdi said: “I heard Sa'd and Abu Bakrah both say that they heard directly from Muhammad saying it and memorized: 'Whoever claims to belong to someone other than his father knowing the he is not his father, Paradise will be forbidden to him.”
حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنْ عَاصِمٍ الأَحْوَلِ، عَنْ أَبِي عُثْمَانَ النَّهْدِيِّ، قَالَ سَمِعْتُ سَعْدًا، وَأَبَا، بَكْرَةَ وَكُلُّ وَاحِدٍ مِنْهُمَا يَقُولُ سَمِعَتْ أُذُنَاىَ، وَوَعَى، قَلْبِي مُحَمَّدًا صلى الله عليه وسلم يَقُولُ " مَنِ ادَّعَى إِلَى غَيْرِ أَبِيهِ وَهُوَ يَعْلَمُ أَنَّهُ غَيْرُ أَبِيهِ فَالْجَنَّةُ عَلَيْهِ حَرَامٌ " .
also referenced under: Hadith 2610 (Reference) & Book 20, Hadith 2708 (In-Book)