Heroin plea brings prison sentence