Michael Mallett of Rockford was sentenced to over eight years in prison for fentanyl trafficking and illegal gun possession.