It's hard to say if you can make the trip without narrowing down the reason for the battery light.
The battery light turning on is usually an indication that the battery is not getting charged properly.
Some common reasons for this include:
Alternator not properly charging.
The voltage regulator on the alternator might malfunction and cause issues related to undercharging or overcharging.
If undercharging or not charging at all, your car will not run for long because a lot of systems need electricity to keep the car running.
If overcharging, this may let you run your 4-hour journey but it won't make your battery happy.
Battery gone bad.
It should be easy to test the battery or have it tested and replace if need be from your local AutoZone-esque shop.
If all else is well, replacing the bad battery should restore normal service.
Corrosion of the battery terminals.
Inspect the battery terminals for signs of excessive corrosion that may be robbing the battery of benefitting from the charging alternator. A multimeter will be handy to confirm if there is big voltage drop across the terminals¹.
IF this is the case, you may or may not be able to make the journey depending on how severely corroded the terminals are.
A physical break or short in the battery-charging wire.
If this is the case your car will not charge the battery properly and the car will stop running after some time.
So really, whether you can make it or not depends on what kind of failure caused the light to turn on.
All in all, I wouldn't chance it for a 4-hour journey; have the problem addressed beforehand.
¹ - take due precautions when testing batteries as they can pose serious electrical and chemical hazards.