Is it acceptable to purposefully fail this exam for my own interest?
No. I expect my staff to do their best at whatever task they've been assigned, whether they like it or not.
Are there other alternatives?
The obvious one here is to go over your (temporary) manager's head. Have a word with your manager's manager and explain the situation. That will pretty much lead to one of two possibilities:
- You're told to suck it up, learn the new language and go and work with the customer. If so, probably time to start getting your CV up to date.
- You and your manager's manager come to some sort of agreement - maybe you only work for a short time at the customer until your company can get a replacement in, maybe you don't have to work there at all. If so, all is pretty much good.
If you can, it would be good to let your temporary manager know you're going over their head (in the politest way possible, of course), but that may well not be possible.
For avoidance of doubt, I certainly don't think your company, and in particular your temporary manager, is behaving well here. Significantly changing your job role without discussing it with you is, while something they are allowed to do, not something they really should do other than in exceptional circumstances. Along the same lines, your temporary manager saying "wait for your real manager to return" may as well mean that you don't have a manager at all. Somebody should be taking responsibility for this issue.