A former Suffolk County correction officer was sentenced to 18 months in jail after pleading guilty to sexually assaulting an inmate at the Riverhead Correctional Facility, prosecutors said.