From Sahih Bukhari (Hadith 3166):
Narrated `Abdullah bin `Amr:The Prophet (ﷺ) said, "Whoever killed a person having a treaty with the Muslims, shall not smell the smell of Paradise though its smell is perceived from a distance of forty years
Reference: Bukhari 3166