Water does turn to ice in a vacuum, although when in a vacuum the water first boils and then vaporizes as a result of the low pressure.
As the water in a vacuum boils, it cools down and if the vacuum is maintained and the temperature gets low enough, the remaining water can freeze.
In a vacuum, the boiling point of the water is significantly lower than at standard atmospheric pressure.
And as the pressure drops, the water will also begin to boil and turn into water vapor.
The boiling process of the water requires energy and it draws the energy needed from the remaining liquid water and causes it to cool down.
As the water then cools due to boiling, it can then reach it's freezing point.
And if the vacuum and cooling are maintained, the water will then freeze into ice.
A water phase diagram also shows that at very low pressures, the freezing point and boiling point of water also converge.
And at these low pressures, the boiling water can also cool down enough to freeze.
And even some videos demonstrate the process, which shows the water boiling and then freezing in a vacuum chamber.
And in the vacuum of space, the water would also behave in a similar way.
The water in the vacuum of space would boil initially and then then remaining water could freeze if the temperature is low enough.