Start by checking the fuse if you haven't already.
Pull off the lace around the sunroof and the headliner should drop down a bit to see the motor and mechanism a little better. See if anything is loos as far as the retracting mechanism goes. Backprobe the motor to check for power. You can remove the visors to get the front of the headliner to drop more if you need to, or even pull off the top of the door rubber (and the screws for the a-pillar plastic. Don't let the headliner snap in half though. There are literally 4 screws which hold on the glass. You can remove them and then lift it off, stand up and look down and see the track area a little better. I've had my rig's sunroof (glass) out a few times. Really simple and easy to put back in. If you remove it, take the opportunity to clean the gasket off real well and the sunroof track and around the sun roof (roof-side) perimeter. That helps keep a good water seal. Yer better off re-adjusting the sunroof to be a bit 'proud' of the roof rather than lower, so it'll shed water rather than 'pool' water on the corners.
Worst case you can remove the headliner by removing the upper plastics and rear seat back. That gives you full access of the sun roof, if you need to get to the rear. But you should be able to tell if its just the motor or something else (hopefully) w/o removing the headliner. Most of the interior plastics remove by pulling off by hand and/or using a plastic pry bar. It takes time to do, esp the first time...but not too difficult. I've had my rig's interior out three times. I'm just saying....it seems harder than it really is. Hopefully you won't need to go that far.
Was it making any funny noises, grinding sounds, before it stopped? Or just suddenly didn't work?