It's possible, Code 5 is the angle sensor system (motor lock). I would check the connectors to the angle sensor and shift motor and make sure they're clean and dry and I would put dielectric grease on the connections. I would try that before buying an angle sensor.
Most 4-wheeler problems are caused by a loose nut connecting the handlebars and the seat!!
You only need two tools in life -- WD-40 and duct tape. If it doesn't move and should, use the WD-40. If it shouldn't move and does, use the duct tape.