know that this is a problem of discipline
It's not a problem. Your mind wants you to know a lot about many things because knowing more about more things is a good thing.
I think this problem also comes from the fact that I don't have a goal for myself.
Once you have a very concrete goal your mind will naturally guide you to focus on what it thinks is the best path to get there.
Think of it this way:
Without a goal, your mind wants to learn as much as possible because it doesn't know what will come in handy in the future.
With a specific goal, your mind can focus on things that will help you achieve that goal.
Sometimes, you have to put yourself under real stress to achieve your goal. For example, if you are living comfortably (in your parent's home, for example) your mind will think there's no reason to focus too much on working a job, because you will not starve.
If you force yourself to live on your own, your mind will see that if you don't work, you will become homeless, so it will help you focus on specific things to make you good at your job.
Basically, stop fighting your instincts. Understand why your psychology is helping you, and setup your environment accordingly.