Cathy, no doubt this is a tough road for you and your husband. He is probably terrified he is going to lose you, and you are both entering uncharted territory. This road is different for everyone, but for married couples, it should be travelled together. This means, if he wants you in his life, you need to have a say in his transition. Transition is usually a process taking years, so you should have time to find a path which you can both travel. I will not lie, most relationships fail, but many do survive.
It is important for you to know why he is doing this. This isn't something he wants, it was hard wired into his brain in utero, and it can't be changed. It is a medical condition which requires medical treatment. From there it can go in a myriad of ways. How far it actually goes is not yet known to him or you, and there can be many changes along the way.
My wife and I are getting through this. Yes, our relationship has changed, but we both recognise we are still the best match for each other. We explored so many options for us to go forward, and after advice from another member of this forum, she found a way she could stay with me and accept her new place in our relationship. For us to stay together, we filed for divorce, and we are now the best friends we've always been.
Our situation is different to yours, but there are ways you may be able to find a future together. I usually requires a shift, but it should be something both of you decide on, and he should be willing to work with you so you both can find happiness. Talk to him, be honest, and demand he return that honesty, and work at it as a team. You can make it!
Hugs,
Allie