I'm going to ask a girl if she is transgender
What is your reason for wanting to find this out?
I am not a fan of her being into prostitution, and I was wondering how this question would cause her to react.
That could be an insensitive question to her, the way you are phrasing it to me. Her gender does not affect you at all, there is no need for you to ask her that.
So what if it's insensitive?
Then it is going to come across as rude. If your comment comes across as rude than this girl is going to immediately check out of the conversation anyway. If you want to have your question answered, you should really be careful with how you phrase it.