While the player is in water, the skeleton's knockback combined with their new(ish) increased rate of fire makes it nearly impossible to melee them. In the time it takes you to swim two feet, the Skeleton can shoot you back three. (It's even worse when working against a current.)
It has always been hard to melee Skeletons in the water, try carrying a Bow with you next time, and remember, the closer you are, the faster they shoot, but the less damage they do.