The Toad decides what happens
Normally an attack has three stages: Choose a target, determine modifiers, and resolve the attack. The third, 'resolve the attack' stage, says:
You make the attack roll. On a hit, you roll damage, unless the particular attack has rules that specify otherwise. Some attacks cause special effects in addition to or instead of damage.
While vigilant guardian says:
Once a creature that you can see within 5ft of you is hit with an attack roll, you can use your reaction to swap places with the creature, and you are hit by the attack instead.
The vigilant guardian complicates the attack by interrupting the third stage. The attack roll is made, the DM determines that the attack was a hit, but before the damage and special effects can be applied, vigilant guardian is invoked to switch the target of the attack. However, this feature says that the guardian is still hit by the attack. They would thus suffer the normal damage and special effects of the attack.
Suppose a Giant Toad begins its turn with your ally already grappled because of a Bite on its previous turn. It elects to use its Swallow Action, which says:
The toad makes one bite attack against a Medium or smaller target it is grappling. If the attack hits, the target is swallowed, and the grapple ends.
Because it is using its swallow action, the Toad makes a Bite attack against your grappled ally, and hits. You invoke vigilant guardian, such that the Bite instead hits you. However, this runs afoul of the description of the Toad's Bite, which says that on a hit:
the target is grappled (escape DC 13). Until this grapple ends, the target is restrained, and the toad can't bite another target.
Thus we have a conundrum. Your vigilant guardian just made you the target of a successful Bite attack by the Toad, but the Toad cannot Bite you because it is currently grappling your ally.
If the Toad does nothing else, its attack has been spoiled, because you have made the target of its attack invalid. Your ally is still grappled, but the Toad did not make a successful Bite attack, and neither one of you takes damage or is swallowed.
However, the Toad can choose to drop its grapple on your ally. The grappling rules say:
If you succeed, you subject the target to the grappled condition. The condition specifies the things that end it, and you can release the target whenever you like (no action required).
There are no timing rules for when something that happens 'whenever you like' is resolved, but if we consider your use of vigilant defender and the Toad's ending of grapple to be simultaneous effects, then the optional timing rules in XGtE suggest that on the Toad's turn, it would be able drop its grapple in response to your ability and still have its response resolve first. Thus by the time you had made yourself the target of its Bite attack, you would be a valid target because it was no longer grappling your ally.
In that case, you would be hit by the bite, take damage, and suffer the special effects of being grappled and restrained, while the Toad would then be unable to grapple another target.
Once the Bite had resolved, then the Toad's swallow would continue:
The toad makes one bite attack against a Medium or smaller target it is grappling.
[At the time the Toad made the Bite attack, the attack was made against your ally, who at that point was grappled, so the swallow and Bite were both legitimately initiated]
If the attack hits, the target is swallowed, and the grapple ends.
[The attack hit, at which point you made yourself the target, and it says that the target is swallowed.]
Thus, as a result of choosing to become the target of the Toad's Bite attack, you would be swallowed.
In short, if the Toad maintains the grapple on your ally, they are still grappled but neither of you are hit with the Bite. If the toad chooses to drop your ally in response to your vigilance, your ally is no longer grappled, but you are Bitten and swallowed.
Narratively, in the first case the Toad is about to swallow your ally, but you present yourself so forcefully that it hesitates and its attack is lost. In the second case, just as your ally is about to be swallowed you move in front of the Toad and it drops your ally and swallows you instead.