The first step is to know the problem.
It could be a number of problems. It could be the sensor is bad, it could indicate a fault with the alternator, faulty leads, faulty wiring... it depends on the situation.
A partial earth
The battery has a temperature sensor. If it was left unplugged, the battery light will still be on
Recheck your battery to see if hooked up right.
My advice is to charge the battery with a battery charger before starting the engine. You will be putting a heavy load on the alternator if you allow it to charge a dead battery. This could damage the alternator.
Check a for a blown/burned out fuseable link between starter and alternator
The alternator or a poor wiring connection.
There could be a sensor wire that is bad or going bad
jump start the car and get a new battery and if it isn't the battery it could be the alternator or both, but try a new battery first
Have your alternator checked. That's what charges the battery.
If your battery is not fully functioning and needs to be replaced, it can make the alternator work harder. This could cause a brand new alternator to go bad. Check your battery, if the battery is not the issue, return the alternator, it should have a warranty on it for at least the first 30 days.
It could be your alternator is going bad