I've been in this situation. It came as a complete surprise, so I don't think it proves or disproves anything that you weren't suspicious. I still can't think of any "signs" I missed. We've talked about it and my DC has said it wasn't something I could have picked up on - always a very private and internal feeling for them.
There seem to be a lot of posters on this thread who haven't had our experience, offering some very hard-core advice. I would ignore all of that unless you want to humiliate and alienate your child, worsen their mental health and cause your relationship to break down.
Obviously, it's difficult. I think a key thing is not to make it about you, if possible. It may be a phase, but as this is a not uncommon experience for autistic teenagers, it may well not be. Your child is still there and they need your support, so, hard as it is, keep your anger/rage/bewilderment/grief/disbelief/other perfectly understandable emotions in check when you are talking to your DC. Find other parents in your position to express your feelings with, or consider counselling for yourself if you're really struggling.
At 17, young people are able to have medical treament without parental consent and in a year's time will be an adult. So I don't think it helps to treat them as much younger than they actually are, and try to make decisions for them - unless they have capacity issues of course. You can advise if they are considering any medical treatment and I would certainly support trying to get them to wait - but as I understand it, unless it's surgery, it is really down to them.
Trans people exist, and always have done. A lot of posters on here seem to be in denial about that, but it's true. And as has been pointed out, people on the spectrum are particularly over-represented in the trans community. We mostly accept gay people quite comfortably now, whereas thirty years ago many people would have been horrified by their child coming out as gay. This doesn't have to be so different. The main issue many of us GC types have with the trans community is the damage some of them are doing to women and girls' rights - not, hopefully, with trans-identifying people per se. Your DC is not doing any harm to women or girls, hopefully - so they can be completely separate in your mind from the TRA types we have problems with.
I was willing to use their prefered name and pronouns, even though it hurt and I do have issues with compelled pronoun use in other contexts. I think that makes a big difference to how accepted a potentially-trans teen will feel, so in my view making a big fuss about it is not likely to be constructive. It's only a name and it's easy enough to change back if this turns out to be a false alarm.
I also think that having a concept of gender is useful in this situation. I know many GC women hate the idea of gender, but again, isn't this at least partly because the word is used in such devious and slippery ways by TRAs? The reality is that your DC DOES have a concept of themselves that is at odds with their biological sex. That's what being trans is. And if you can use the word "gender" to refer to that concept it may be very hepful to communication.
In general I think it's best to listen a great deal more than you speak, and if you have to ask questions try to make them open ones, i.e. ones that can't be answered with "yes" or "no". Make it very obvious to your CD that you love them and want to support them. They'll be feeling very vulnerable.
For me, grief has been the biggest thing to deal with, once the shock wore off and acceptance set in. There's a huge adjustment in what life will probably be for this person versus what we might have hoped. I still find it hard sometimes to believe that my son is now my daughter. It is a kind of bereavement, and those are tough. Be kind to yourself as well as your DC. I wish you well.