A 41-year-old man was sentenced in federal court Wednesday for a charge of possession with intent to distribute heroin.