I'm not very good with advise but I can try to cheer you up.
You're always going to have people like that around and when a child or even an elderly chooses/feels more comfortable as a different gender then people should just expect the fact that that's who they're friends with. But if they asked you as a joke and you made another joke back only for them to be mad it's not your fault and you're valid for so many reasons. Gender really isn't an important thing in people's lives but some still have the mind set of the 40's but I hope you feel better and make up with your friends and again you are valid (▰˘3˘▰)
I think it's clear they're not warming up with the non binary idea thing, but just as you want your opinion to be respected, you should understand where they came from. They expected you to answer either of the two but if you insisted on your answer, it probably made your friend uncomfortable too because it's not meant to be a serious discussion in the first place. It's clearly a difference in value and perspective, and it's not your responsibility to educate them. If you want to keep the relationship, you can be the bigger person and apologize, but walking away is always an option. It depends on your priority :)
btw I'm Asian from a SEA country, so I'm more on the conservative side, but I hope I can offer you different insight. Sometimes being hard headed is not always the answer. Good luck :)
okay so on twt my friends jokingly talked about getting pregnant with another friend and they said that the gender result is coming soon and asked us to guess for fun, im nom binary so I said I don't wanna assign any gender until they're old enough to understand what they want to be and we kinda went back and forth and i understand it was a joke but it made me feel so invalidated to the point I just deactivated cause they were so insistent about assigning gender from birth and shit. Like im just sharing my opinions why do they have to be so defensive about it? And now everyone is texting me on different social asking me what happened? am I okay ? Like??? Idk why don't u tell me?? And I'm just scared to tell them cause I'm yeah I'm scared and I don't like talking about my feelings. So idk what should I do.... Any ideas??