This could be caused by a million things. The key to finding out what is causing this is to read the code out of the OBD port. If it's a '97 or newer car, take it to Auto Zone and they will read the code out and advise you what to do next. Call them first to see if they read codes for free, I think they do. If it is older than a '97, search the web for instructions on how to short the contacts of the port to read the code.
check your camshaft sencor and your crankshaft sencor.
I have to guess at a few things but.. I am guessing because the engine has serious problem with how it is running the engine computer has increased the idle speed very high to try and keep it running. If this is the case putting it into gear will bang very hard and drop the engine speed to below what the engine control computer can keep it running. So it quits. Get the engine fixed.
Lack of fuel or too much fuel will make the engine stop running. Since you are able to re-start and run for a short while, the problem is probably a clogged fuel filter. You might also want to check the air filter.
Be sure the cooling fans are functioning when the ac is running.
Many engines have an automatic shut off when the engine becomes too hot. Once the engine cools down it may also be equipped with an automatic startup.
When the engine 4jg2 starts then its stops it is due to a mechanical failure.
Fuel pump
Carb.? May need to be re-built or replaced
You may have a faulty engine light. Or, you may have a serious problem with your car. You should take your car to a local mechanic for diagnostics.
The timing on your truck is probley off mine had the similar problem. If you don't have i timing light, you can always do it by ear. Just turn it clockwise till your engine starts up if it starts up your close, if it stays running turn it little buy little till it purrs..
how to disable pass lock fuel system cutoff on 1996 buick skylark so it still starts
how to disable pass lock fuel system cutoff on 1996 Buick skylark so it still starts