It could be a bad or unsecured battery ground cable between the battery and chassis or chassis and engine. Turn on the ignition switch to the on but not run position do you see an icon on the instrument panel representing a battery, if you do not see this battery icon the alternator is not seeing power to allow it to charge. Start the engine does the battery icon go out. A more complex but good diagnostic test is checking "voltage drop" on the battery ground and power cables. You can find a video on how to do a voltage drop test on youtube. Put a volt meter across the battery terminals with the engine off, at rest the battery voltage should be 12.6 volts if the battery is fully charged. Now get a friend to start the car while you watch the voltmeter, the voltage reading across the battery should read approximately 14.6 volts if the alternator is charging correctly.