It is definitely a New York State Militia officer's button. Although the emblem on its front dates to the civil war era, your button's back does not date back that far. It has a version of self-shank back which first appeared in the early-1900s and is still in use today. ("Self-shank back" means the back itself forms a tunnel for the thread, instead of having a separate metal loop for the thread.)