Two-headed snakes can and do survive in the wild, although they are very rare.
The two esophagus will typically align and form one where the neck meets. As a result, both snakeheads can eat.
The main challenge that the two heads causes is when it comes to fleeing predation.
The extra head increases the width of the animal, making it harder to sneak down small holes in the ground.
But overall, a two headed snake can fend for himself in the wild. (A two headed snake always shares one gender).
The one minor snafu that the two-headed snakes face, is that they sometimes fight each other for food