The plea follows months of surveillance by the FBI that uncovered his plot to funnel heroin into the North County Correctional Facility