First thing is examine the vehicles wiring harness for the o2 sensor for damage and if that is good replace the o2 sensor, reset light and wait to see if it returns.
If it dont your good to go.
If it returns post back and I can help you find out whats wrong.