The Ancient Beast is replaced by the Enraged Ancient Beast on Challenge Level 1 and above. The Enraged Ancient Beast has more health and damage than its lesser sibling and spawns from Enraged Ancient Buildings, but otherwise behaves similarly to it.
It is very easy to defeat these with a sword (preferably a Colossus, as it has a much larger range), as the single swing will hit most of the sections, making them take a lot more damage than with a single-hit weapon.
If you aren't melee, you might want to use plasma grenades. They can hit multiple sections of the worm at once.
With a weapon that can't hit multiple sections, you can hit the worm right when it spawns and it will hit 3-4 times. This happens because all of the sections are stacked on each other.