2. Try shifting the transmission into gear while the engine is off. If it shifts smoothly, then the problem may be electrical, rather than mechanical.
3. If shifting the transmission into gear while the engine is off worked, try starting the engine and shifting into gear while holding down the brake pedal. If it shifts smoothly, press the "shift lock" button on the gearshift and shift into gear. This button is usually located near the gearshift lever.
4. If the above troubleshooting does not work, the problem may be with the ignition switch, the neutral safety switch, or the shift cable. You will need to have your car diagnosed by a qualified mechanic to determine the exact problem and repair it.