STARTING PROBLEM

2003 Toyota Prado • 140,000 miles

I scan the car with the x431 launch. The code is p0340. Means the crank shaft position sencer circuit (G signel)i check all the wires also change the sencer but I cant to solve the problem. Its still starting trouble some times its start but some time its didnt start
what can I do now can u help me plz