If something requires you to take the Attack action, you can simply attack the ground or empty space or anything else
The Attack action states:
[...] With this action, you make one melee or ranged Attack. See the “Making an Attack” section for the rules that govern attacks [...]
And the "Making an Attack" section in term states:
[...] An Attack has a simple structure.
- Choose a target. Pick a target within your attack’s range: a creature, an object, or a location.
Thus the Attack action does not somehow require you to target a creature; you can instead target an object (such as something you carry), or a location (such as empty space)
There are ways to take the Attack action without actually making any attacks at all
One such example is the Battle Master Fighter's Commander's Strike Maneuver which states:
When you take the Attack action on your turn, you can forgo one of your attacks and use a bonus action to direct one of your companions to strike. When you do so, choose a friendly creature who can see or hear you and expend one superiority die. That creature can immediately use its reaction to make one weapon attack, adding the superiority die to the attack's damage roll.
Here the ally makes the attack instead, but note that the ally could also choose not to use their reaction. This would result in you having taken the Attack action without yourself, or anybody else, making any attacks.
Similarly there is the Warlock's Pact of the Chain feature which states:
[...] Additionally, when you take the Attack action, you can forgo one of your own attacks to allow your familiar to use its reaction to make one attack of its own.
There are also a few things which require you to take the Attack action but that occur before you've actually made any attacks. This includes things which increase your reach but also the Eldritch Knight Fighter's Arcane Charge feature which states:
At 15th level, you gain the ability to teleport up to 30 feet to an unoccupied space you can see when you use your Action Surge. You can teleport before or after the additional action.
Another such example is the Horizon Walker Ranger's Distant Strike feature which states:
[...] When you take the Attack action, you can teleport up to 10 feet before each attack to an unoccupied space you can see.
This would allow you to teleport before making any attacks (including the first one); however, it doesn't prevent you from making attacks entirely.