generally speaking yes, it's fine to swap an old air cooler for a new liquid cooler.
bear in mind that liquid coolers come with what can be a large radiator to dissipate the heat, so choose a case that fits the water cooler's radiator easily
good luck with your build!