The P0012 on the F150 is very often caused by the solenoid of the variable valve timing. The solution in most cases is to replace this component with a new one. But still, you need to test and make sure that indeed this component is causing all this trouble to your truck. Sometimes it is the oil or the actuator itself. That’s why you need to do a good diagnosis before jumping to conclusions.