Essentially I think they are both very similar jobs in principle, and the question of which is harder depends more on your own skills.
Basically, when making a tune, a producer will choose from a vast array of different audio "samples", and arrange them in a way that creates something which is hopefully amazing as a whole.
And likewise, when mixing a set, a DJ will choose from a vast array of different audio "tunes", and arrange them in a way that creates something which is hopefully amazing as a whole.
The main difference I think comes in planning and spontenaity. In a studio you obviously have as much time as you want to get things right, can go over bits again, experiment with various possibilities, and not stick your head above water until you're happy with what you've done. DJ's don't have the same luxury as they essentially are creating in "real time".
Having done both, I don't think either is more difficult necessarily. Some people who would find production to be easy might never be able to beatmatch in their lives. Likewise there are probably some DJs (no names) who despite playing tunes for a living can't grasp the basic fundamentals of how tunes are made.
So in conclusion, I'd say they're both difficult, but they both get easier the more you practice