A paedophile who abused boys has been jailed for 19 years.