A New Bedford man will serve three years in prison for taking part in a fentanyl distribution ring worth almost $1.3 million.