Games are fun because they're either challenging at the lower levels or have some epic goal at the end. That's why people are willing to 'grind' for thousands of hours with the promise of an epic win at the end.
Making things fun at the low level
Use the Pomodoro technique. When you can't quantify your progress, it gets boring and frustrating because you don't know how much progress you're making. Count how much effort you're putting into studying. You can gamify it by counting the amount of Pomodoros you put into your work/studies each day and trying to reach or exceed a certain number.
Familiarize yourself with the concept of Flow. This is almost necessary for any kind of learning. This is what makes games fun - the challenge is not too hard as to be frustrating and impossible yet not too easy as to be boring/grindy. There are entire articles and other questions on Flow, so look them up.
Making things fun at the higher level
Let's face it, studying to get a good job is not a great motivator. Studying to get good grades or a first class distinction is not motivating either. You need some better goals.
This is exactly why you see a lot of entrepreneurs wake up at 5 AM and sleep at 1 AM, doing something that pays almost nothing for months. Without that higher level vision, they'd be exhausted and give up almost immediately.
This is also why people are willing to stick with a 100 episode long marathon TV series just to see the ending.
One solution is to meditate and learn what you want to accomplish in the long term.
Sadly, most people never find what their higher level purposes are. So a lot of productivity gurus, including the well known GTD method and Robert Greene's Mastery, encourages you to simply stick with doing low level things you enjoy until you find a high level goal which you'll love.