The Messenger of Allah ﷺ said, "Whoever claims descent from someone other than his father will not smell the fragrance of Paradise, though its fragrance can be detected from a distance of five hundred years' travel."
حدثنا محمد بن الصباح أنبأنا سفيان عن عبد الكريم عن مجاهد
قال رسول الله ﷺ من ادعى إلى غير أبيه لم يرح رائحة الجنة وإن ريحها ليوجد من مسيرة خمس مائة عام
Sourcing, sahih. Busiri graded it sahih. I say, Abdul-Kareem Jazari was not alone in narrating it. Hakam corroborated him, as recorded by Ahmad, 2/194, 171, from Mujahid with similar wording. The more correct view is seventy years, not five hundred years. Allah knows best.