
    The People of the State of New York, Respondent, v J.W. Hardy, II, Also Known as J.W. Hardy, Jr., Appellant.
    [821 NYS2d 533]
   Appeal from a judgment of the Orleans County Court (James P. Punch, J.), rendered February 28, 2005. The judgment convicted defendant, upon his plea of guilty, of criminal possession of a controlled substance in the fifth degree.

It is hereby ordered that the judgment so appealed from be and the same hereby is unanimously affirmed.

Memorandum: Defendant appeals from a judgment convicting him, upon his plea of guilty, of criminal possession of a controlled substance in the fifth degree (Penal Law § 220.06 [1]). Defendant contends that his waiver of the right to appeal is invalid because he agreed to waive his right to appeal only if he was sentenced to the “Willard program,” and he was not so sentenced. We reject that contention. The record establishes that County Court stated at the time of the plea that it would sentence defendant to the Willard program if it appeared at sentencing that such a sentence was appropriate, and defendant waived his right to appeal. The record further establishes that the court was advised at sentencing that defendant was ineligible for that program. We thus conclude that defendant’s waiver of the right to appeal was knowingly and intelligently entered (see People v Lopez, 6 NY3d 248, 256 [2006]; People v Kemp, 94 NY2d 831, 833 [1999]; People v Moissett, 76 NY2d 909, 910-911 [1990]). By pleading guilty, defendant forfeited his contention concerning nonjurisdictional defects in the indictment (see People v Cox, 275 AD2d 924, 925 [2000], lv denied 95 NY2d 962 [2000]). In any event, the valid waiver by defendant of the right to appeal encompasses that nonjurisdictional challenge (see generally People v Verrone, 266 AD2d 16, 18 [1999]). We have examined defendant’s remaining contention and conclude that it lacks merit. Present — Gorski, J.P., Martoche, Smith and Pine, JJ.  