If you live in NY State for two years or more, you can file in NY.
Each state has its own jurisdictional requirements, but you or your spouse must be a resident for some period of time in that state to file.
Leonard M. Weiner, Esq./Divorce Solutions