What you signed up for
I am not a lawyer, nor have I seen your contract, but most of them have clause along the lines of 'and other tasks as required', which means that contractually you have agreed to do other work for him if required.
Now that the disclaimer is out of the way let's get to the real stuff.
It's a fact of life that sometimes you have to do things you don't want to do. Maybe the boss doesn't have anyone else who he thinks can do this piece of work, maybe he thinks you should learn these new skills required to be able to do it, without really talking to him who really knows.
Sometimes what is good for the company isn't good for your career. At these points you have a few options.
Sure you could just tell the boss 'No, I don't want to do this'. However I don't see this going very well, some might call it a 'career limiting move' by which I mean, depending on where you live, you could find yourself terminated rather quickly. So this isn't really an ideal option.
Accept it and do it
Another option would be to suck it up and get on with it like millions of other people in the world are currently doing. You might learn something new from this, you will get the opportunity to learn the new technologies, you will get the opportunity to work more with GUI stuff and you will get the opportunity to further your skills, this could, in time, help you to get a new job.
Alternately you could just be miserable for the entire project depending on the kind of attitude you approach it with. Whether or not you do this option is definitely your call. Will the new skills be worth the potential dislike of what you are doing.
Present a case for someone else
O.k so maybe you aren't the right person to tackle this task, maybe one of your co workers is itching to do this kind of work, maybe they already have experience doing this kind of work. If you really don't think you are the best person for the job then you can talk to the boss about someone better suited doing this. This is a very risky choice however, as you are drawing attention to the fact that you lack what might be required skills and that you lack the motivation to help the company if it isn't in your own best interests.
Move on to greener pastures
I hate suggesting this, but I will do so for the sake of completeness of your options. You could quit, this shouldn't be your first choice though. Maybe you tried suggesting someone else and blatantly refusing, maybe you gave it your best shot and its just not for you. Maybe your boss knows all of this and just doesn't care. If it's not working out and you are consistently doing things you don't like doing you can move on. This is also very risky, as you cannot guarantee another job, or even that you will enjoy working for that other company. Plus you will have to realise that even in that new company there will be the potential for you to be given work you don't like. But if the company wants the work done, someone needs to do it and you cant always get the stuff you like.
Essentially you have a plethora of options to take, each with their own flaws. I won't pretend to know what's best for you, only you can know that. Personally I would at least give it a try, you never know what you might learn but the choice is yours. Good luck in whatever option you choose!