I have no experience with auto transmissions, but your problem is definitly the switch at the transmission lever. The switch is there to prevent start of the engine except when the transmission is in Park. I have never understood why there is no corresponding function on cars with manual transmission. Those can be started in any gear. Are "automatic" drivers less careful?
Anyway, either the switch is faulty or you have a loose cable or almost broken cable in there. The fact that you can start by juggling the lever makes it 99 % sure that the problem is at or near the switch. The vibrations from the juggling make contact now and then and your starter cranks.
This is an easy or very easy problem to fix. You must remove the panel(s) at the lever in order to get to the switch. I can't tell for sure how to do this, but most likely it's a few Phillips screws. Then check the switch. If you are lucky it has come loose or something like that. I would first take the panel off and do a visual inspection. If the cables seem fresh, the switch is properly mounted, I would buy a new or used switch and replace it.