It will still be a shock to them. It's quite possible you'll be the first trans person your roommate has ever met and there's a whole load of societal assumptions that you'll need to work through. Having it out ahead of time will likely make things easier for you.
I'll add to the advice about informing the university. You don't have to ask for a new roommate because you're trans. But if the currently assigned roommate comes from a more conservaitive part of the country, the university may want to make changes to reduce drama for everyone. And even if not, if they know it may reduce any future drama. I realise, abstractly never having to deal with this myself, that revealing this aspect of yourself is something you're still nervous about but as others have said, the university wants all their students to do well and will likely have experience dealing with students with similar situations to help you.