don't know if the wiring on my '01 is the same as your '98, but here is what i have based on the FSM:
the motors that run each power door lock are "reversible" type, meaning they work in two directions - so if your motor does NOT run in both directions, i would agree either a bad ground or bad motor. if it works in one direction only (i.e. locks only or unlocks only) then you most likely have a fauly connection on that particular wire at the motor itself - on my schematic the power wires are run in series (yours may be the same) so if one was to break, all locks would stop functioning in that corresponding direction. as for the ground, on my schematic the ground is provided by the body - i.e. thru the contact of the motor body to the hatch where the motor is attached. so you may want to open up the area and see if you have corrosion or very loose mounting bolts on the motor mount. accessing the motor would require removing the panel on the inside of the hatch. as far as actually removing the motor/locking mechanism, i am not sure (haven't tried it yet) but looks to be similar to removing an "everyday" striker plate - you'll be looking for two control rods coming in to it - those little rods with a bend and clip at the end where they attach to the striker plate. there will be two wires coming in to the motor - my schematic says "pink/black" and "orange/black", and i also see a connector at some point but don't have a location, but most likely it's onthe motor.
one other idea to further determine if it is a bad ground fault - does your license plate light work? if so, i would assume the hatch itself is getting a good ground with the rest of the body. if it doesn't, mayhaps the hatch itself is not getting a good ground, tho i would seriously doubt this as it has hinges which provide plenty of ground path.
also, i'm thinking there will be a connector on the motor itself - you can check here for power. have a friend help you by hitting the control switch on the driver's door while you check for power with a meter or a test light.
once again, this wiring info is from an '01 model....hope you find the prob.