Simple answer: Ban them from providing nourishment.
Goodberry does two things. It restores 1 HP, which isn't very useful unless you are at 0 HP. It provides nourishment for 1 day. While there are still good reasons to prepare or use Goodberry, if you make a change that prevents it from providing nourishment, its value is greatly diminished.
Difficult answer: Exhaust resources in general, not just rations and water.
While banning Goodberry might be a good first step towards the type of campaign you would like to play, spells that create food like Create Food and Water and Heroes' Feast exist at higher levels as well.
Instead, consider exhausting all of the spell caster's resources through puzzles and encounters that occur during travel. Forcing the Druid, Ranger, or Cleric to decide between food for the day and continuing healing a party member, killing a well positioned enemy, or defeating some other obstacle can provide the same type of survival game you are looking for.
Think of the party's food supplies as another resource, right up there with HP, ammunition, etc. If an encounters drain one resource, such as HP, spells can restore a good portion of it. Similarly, one adventuring day requires rations, but spells can provide most of it. The survival part kicks in when the party needs to decide whether to roll the dice and forage or spend a spell slot that might provide other utility to guarantee food and water.
This type of encounter design is neither easy nor quick, but it may feel better for your players rather than cutting up spells/spell lists. However, only way to know what you and your party find fun is to play it.