The sentence followed a plea deal with the Manhattan District Attorney’s Office.