Aside from such exotic items as key security chips; there is an everyday item called the neutral safety switch; which usually causes the kind of problem you describe. This switch is attached to the gearshift linkage; and is designed to prevent the starter from being activated, unless the transmission is either in Park or Neutral. The contacts in neutral safety switches go bad over time; which then prevents the starter from being activated. Often, the Park contacts will fail while the less frequently used Neutral contacts will still work. So it would be worthwhile to see whether the starter will work when the gearshift is put into Neutral. If it does; replacing the neutral safety switch will fix the problem. But that switch can also go out on both contacts; so even if it also doesn't start in Neutral, the switch may still be bad.
The ignition starter switch also has a set of contacts in it, which are only used for starting. These contacts also go bad over time. You can bypass the neutral safety switch and the ignition starter switch at the same time by connecting a jumper wire (or a remote starter pushbutton switch) to the battery positive (+) terminal; and briefly touching the other end to the small terminal on the starter solenoid where the wire from the ignition switch normally connects. It is important to have the ignition switch turned on when you do this; because many ignition switches have an anti theft feature that grounds the starter terminal when the switch is off. But bear in mind that this test may result in the engine starting; so be sure the transmission is in Park and the parking brake is firmly set. If the starter works consistently in this test, then the problem is either the ignition starter switch or the neutral safety switch.