Correct. This could be discrimination based on gender identity.
In January of 2019, New York State passed the Gender Expression Non-discrimination Act (GENDA), prohibiting discrimination against transgender persons in employment, housing, public accommodations, education and credit. The newly enacted law explicitly protects transgender and gender non-conforming individuals from discrimination by adding gender identity and expression as protected classes under New York State's existing human rights law.