I believe flat file upload will do that for you. You need to know the role number in your moodle (i.e., students are Type 1; as you add roles, they get an ID number, which I'm pretty sure is their Type).
You'll also need to decide whether you want to UNenroll them from their current role. If so, you'll need to research how to do that (maybe via flat file? maybe via bulk user actions?)
Moodle docs are your friend. Be sure to read docs for your version!