Get it scanned. A proper scanner would show what is wrong. A few probable causes, namely speed sensors, AT position switch, wire harness and eventually TCM.
It is usually integrated into the distributor. You need to to the complete unit( distributor).Set the TDC mark correctly and just pull out the old and install the new.