In short, yes, the spell slot is consumed. They cannot teleport into the Forbidden area, but things can still happen.
What the rules say
From the SRD: "Preparing and Casting Spells ... To cast one of these spells, you must expend a slot of the spell's level or higher."
Casting the spell is one thing. The spell taking effect (or not) is a separate thing.
To give a point of reference: It's fundamentally the same as casting Charm Person on someone who is immune to the charmed condition, and little different from someone making their saving throw.
To get into the details more, the Teleport spell would be cast and would evaluate as normal up to a certain point. The spell slot is consumed, and the DM (or whoever) rolls the d100. The Teleport may go wibbly-wobbly all on its own. The Forbiddance is only relevant if "On Target" is rolled, in which case you decide what happens. Forbiddance does not say, so it's up to the DM to make a judgment.
How you make up for the rest
There are as many possibilities as there are DMs in the world, but here's how I'd run it:
Different spellcasters' spells work differently. Does the Forbiddance prevent teleports by making them "bounce," by absorbing/dismantling the magic, or by preventing the Teleport from the finding its target?
If it bounces Teleports away, I'd reroll the Teleport table, and On-Target lands near the Forbiddance boundary.
If it absorbs or dismantles the Teleport, the players would go nowhere, and the spellcaster using Forbiddance may even capture the Teleport's magic for some purpose! (Scrying, or a counter-Teleport, perhaps)
If it prevents the Teleport from finding targets within the area, the Teleport would resolve to the closest it can find, which depends on the description. If the player targeted the spell using geographic positions, "Off-Target." If the player targeted the spell using a description, "Similar Area."