Minecraft wiki entry for How_to_get_rid_of_a_rogue_wither, associated text: Make walls or a fence to mark the danger zone, it is a key precaution to not enter as you risk leading it out into the safe zone.
Try and contain the wither underground, there will be no mobs to attack and the surface is now a safe zone, however it is still a precaution to not enter the area, as it could go up to the surface and cause more carnage