While many good answers have gone down, I'll try to give a few generic-as-possible approaches.
Surprise
If the characters don't know the melee creature is there before being in melee, they don't know to avoid getting close. They might try to get back out, but you did get the big guy in melee to begin with.
Cover
If the melee creature is behind a wall and unwilling to come out, and there's no place around the wall that is still away from the creature, the players either have to flush it out (perfectly possible) or get close. Imagine a monster just around the bend of a corridor: the only place that can get an arrow around the corner is close enough to get mauled.
Support Fire
A favorite among video game developers for a reason: the melee brute offers threat, while the archer behind it offers urgency. The characters can deal with the archer slowly, forced at range by the melee threat, at the cost of being fired at. They can take even longer to defeat the brute at range, while still suffering ranged attacks. Or they can attempt to tangle with the brute, if only enough to get through to the skirmisher.
A combination of the above
What you really should be doing. Particularly nasty in 5e is a combination of cover and support fire, owing to the fact you can attack in the middle of your move and cannot ready an action (such as an attack to hit the archer when it emerges from cover).
In your case, for example, a pair of CR1/4 skeletons with shortbows, hiding behind boulders on either side of the room across the Chuul's puddle would force reaction from the characters: on their turn, they'd emerge, fire (low-damage, low-hit-chance, meager) arrows and hide again, being safe until their next turn. That would get your players faced with a dilemma: suffer an HP tax for every round they spend ruining the puddle, or charge the Chuul (or past it, to get rid of the archers and go back to their careful approach - at which point the Chuul has had its chance, as the characters fought through it).