You need carbon to make steel, but it doesn't necessarily have to be from coal. So we definitely could replace coal, but that may be very expensive at today's scale. Even if we can use trees rather than coal, we are avoiding the release of carbon which was previously locked away underground.
Also, coal we dig up is much more suitable for one or the other purpose. If you mine thermal coal, the steel plant doesn't want it, they want metallurgical coal. If your country has a steel plant, and a thermal coal mine, you will export thermal coal from the mine and import metallurgical coal to run the steel plant. Well, if nobody buys your thermal coal, the coal mine shuts, even if you still have a steel plant.