After the 2002 federal law went into effect, Most states changed their codes to match it, but not New York. The DMV's website explicitly states: "A motor-assisted bicycle does not qualify for a registration as a motorcycle, moped or ATV and does not have the same equipment." Meanwhile, in New York City, a 2004 law aimed at minibike riders made it illegal to ride a "motorized scooter," which the city defines as any vehicle powered by a motor that is incapable of being registered with the DMV.
You can read about NYC DOT's current effort to educate businesses and crack down on scofflaw behavior by commercial delivery bikes here. This is for the broader subject of bicycle delivery, not e-bikes. The state legislature needs to act to address e-bike regulations.