When you moved out of New York City, did you also move out of New York State? If so, you should file a part-year resident return, Form IT-203, even though you were a New York resident for almost the whole year. You might also have to file a part-year resident return for the state that you moved to, even though you only lived there a couple of weeks in 2017. Check the filing requirements for your new state.
If you moved out of New York City, but still lived in New York State for the rest of the year, you should file a New York resident return, Form IT-201. Moving out of the city will be dealt with on the resident return.