A 36-year-old Illinois man has been sentenced to several years in federal prison for distributing fentanyl in Wisconsin.