if you take out the area where the light and switch for the sunroof , there should be a way to wind the sunroof back... My friend told me this and I havent confirm it on a 240sx.. I think your motor is shot not your sunroof.
Im in need of a sunroof cause it has rust underneath the metal so...