Hardly sounds like an emergency to me. Public transport or a taxi would have been the intelligent options. I suggest you buy a bus pass as you will be saying goodbye to your learner's permit for a long time.
As others have pointed out, your decision to drive unaccompanied falls into the 'monumentally stupid' category. You're likely to face a lengthy ban as well as a significant fine, and you'll wish over and over again that you'd chosen to walk the 2km.
In short, driving unaccompanied on a learner's permit is considered the same as driving unlicensed. From my reading of the page above (and someone with better French can probably give better guidance) you'll be punished with a fine. Luckily you weren't doing it while banned, or you'd be facing three years in the pokey.
As others have pointed out, they are in the process of tightening up these laws.
Three years in jail is the maximum sentence for people caught driving after their license has been taken away. This is not the case here. As Village Idiot has pointed out, the OP has to expect a fine plus a ban. But no jail time for sure.
I was stopped coming out of Rapperswil towards Zurich - one cop walks around car checking tyres I guess, other asks for license and vehicle documents. Whole thing took 2 mins. they were stopping 3 cars at a time, as soon as we three moved off they pulled in the next 3.