Well a bunch of farmers and poorly trained army men beat the most powerful army in the world to gain independence (American Revolution) so I am sure it is possible.
well, they had some things going for them...
- The British supply lines were extremely long and overstretched.
- The British were at war at the time with France (among others) so couldn't send all the troops they would normally have been able to send).
- Communications were rather slow. Sending a request for reinforcements took weeks to arrive in London, the reinforcements themselves weeks more to cross the Atlantic by which time it was usually too late.
The forces opposing Iran right now don't have most of those problems.
Supply lines for the US are long, but reinforcements and supplies can now be airlifted and be in theater within 24 hours rather than a month or so.
The US is already in theater in force, having considerable forces on both the east and west borders of Iran, plus a fleet blocking Iran's only access to the open ocean.
To the north Iran is bordered by Turkey and Russia, not exactly friends of the Ayatollahs either.