Your title asks:
What happens if an ocean is zapped by the witch bolt spell?
The ocean is not a legitimate target. The target must be a creature, per the description of the witch bolt spell (PHB, p. 289; emphasis mine):
A beam of crackling, blue energy lances out toward a creature within range, forming a sustained arc of lightning between you and the target.
In the body of the question, you state:
From what I read, the witch bolt spell (PHB, p. 289) will only hit the target.
No, it could also miss the target. You need to make an attack roll, per the next sentence in the spell description:
Make a ranged spell attack against that creature.
But you might mean that witch bolt “will hit only the target”. Yes, it either hits the target or it misses it. It cannot hit anything else in the area.
You also ask:
But, will it hit anything else, for example, a creature swimming within 10-15 feet of the strike location?
No. The “strike location” is a creature (see above). The spell will not hit another creature near the target creature.
You also mention the reason for your question:
The reason for this is an attempt to electrocute a chuul that is hiding somewhere underwater.
The spell says its target is a creature within range. It does not say a creature within range that you can see (note that other spells do have this restriction). So it is perfectly permissible to target with the spell a creature that you can’t see. But what do you mean by hiding?
If the chuul was not seen by the caster, and then took the Hide action, and made a Stealth check that beat the caster’s passive Perception score (or active Perception check, if the caster spent an action to Search), then it is hidden from the caster. If the chuul is truly hidden (which means unperceived – not only unseen. but also not perceived by any senses), then it cannot be targeted – the caster simply does not know that it is there.
However, if the chuul is just relying on the water to disguise its location without taking the Hide action, or if it did take the Hide action but the caster still beat its Stealth with their Perception, then the caster is aware of the chuul and can target it, even if it is not seen (it might be perceived by a ripple on the surface, for example).
In the case that the chuul is not actually hidden, it falls to the Dungeon Master, as the describer of the environment, to tell the player whether or not the chuul is seen. The DM may be informed by the “Underwater Encounter Distance” Table (DMG, p. 117). The DM may also want to consider whether the water makes the chuul lightly obscured or heavily obscured.
If the DM rules that the chuul is not hidden but is unseen, then the witch bolt attack would fall under the “Unseen Target” rules; the caster would have to correctly guess the chuul’s location to be permitted an attack at disadvantage.
If the DM decides that the chuul is seen but is heavily obscured by the water, then its location would be known but the caster would still have disadvantage on the attack roll.
If the DM decides that the chuul is seen but is lightly obscured by the water, the caster could make the attack roll as normal.
Welcome to the site Random Wizard, and happy chuul-hunting!