747s in everyday operation typically use fuel for ballast when needed. Ballast fuel is considered to be part of the zero fuel weight and you are not allowed to burn it, although obviously if you were about to run out of fuel, it's available.
Ballast fuel is carried in either the center tank or distributed evenly in the four main wing tanks. Individual carriers have different ideas insofar as their preference for either center tank or wing tank ballast fuel. Also, after the TWA 800 explosion back in the late 1990s, there were as I remember special rules for a time on carrying ballast fuel in the center tank.
Should you wish to explore the effects of ballast fuel on the CG of a 747-400, go to 747.terryliittschwager.com and select the first aircraft N402YY. When the aircraft comes up, you'll notice that the BALLAST FUEL radio buttons at top center have the Center Tank selected. If you put 100000 lbs of fuel in and then 1000 lbs of ballast, you'll see the zero fuel weight CG change from 30.6% MAC to 30.8% MAC.
Ballast fuel is more often necessary for 747s that were originally passenger airplanes and then converted to freighters than otherwise. The problem is that the heavy structure added for the large cargo door aft of the wing brings the basic operating weight CG farther aft then before the cargo conversion. 747s originally manufactured as freighters do not have this problem as they have additional structure for the nose cargo door in addition to the side cargo door structure.