In New York, you must meet the residency requirement according to specific legal criteria.
You and your spouse were married in New York or lived there as a married couple, and at least one of you has been living in New York for a continuous year immediately before filing for divorce.
The grounds for divorce happened in New York, and you and your spouse, or both you and your spouse, were residents in the state.
The residency requirement may also be met if you or your spouse have been a continuous resident for at least two years before the divorce begins. (N.Y. Dom. Rel.Law § 230 (2022)