When it doesn't start, does the gear indicator show park? It could simply be a linkage issue or the sensor that you mentioned.
If you look at the first pic below, it explains how to adjust the shift cable. So, if it doesn't indicate park but instead shows reverse, try this first.
The remaining pics are the removal and replacement of the transmission range sensor. To access the range sensor, the transmission pan and valve body will need to be removed.
Let me know if this helps or if you have other questions.
See pics below.
Images (Click to enlarge)
Saturday, May 8th, 2021 AT 9:42 PM