Walking away, or even running, away from a police officer is not a crime in New York. Were you taken into police custody? If so, for how long? You may have a claim against the police for false arrest. I am a former federal and State prosecutor and now handle civil rights violations so feel free to check out my web site and contact me.
The above is for informational purposes only and not meant as legal advice.
The first question that arises is 'what was the basis for the police stop in the first place.' While this is not a resisting arrest charge that body of law is instructive. It is not unlawful to resist an unauthorized arrest (although doing so is not recommended for safety reasons). It sounds like they cite no illegal conduct other than your refusal to get back into the vehicle. Mr. Rothstein is correct. You have rights that should be explored.
As we don't know enough about your case, you should not consider my answer to be legal advice. You would need to consult with an attorney at length and include details about what has occurred in order to adequately assess your criminal exposure.