It's basically linked to attention, as others have pointed out. I'm working through the same problem myself atm. If you really think about it, attention is something we have most of the time we're awake. We're almost always attending to something, whether it be social media, our thoughts, memories, school work ...etc. Therefore, our attention is always there anyway. It's just that the direction of the attention that changes as the day passes by. It feels that we are "paying attention" sometimes but not others because the
direction of the attention changes, not because we our mind "comes up with attention when it wants". Sometimes our attention "drifts" to our self talk, memories, fantasies and dreams causing us to come across to others as if we're "not paying attention". In fact, we are paying attention to our thoughts. Why does it seem involuntary ? Because our attention had drifted towards them. Since attention is something we have most of the time, it's not about "paying attention" but it's about "directing the attention we're paying anyway because we're awake". It's about manipulating your attention, rather than "conjuring" it. Since you have your attention most of the time anyway, the real challenge is to direct and manipulate your attention using your own will rather than let it drift freely.
To do this, you need to
direct your attention to understanding how your attention drifts. So you need to examine the reasons why your attention drifts away and you need to eliminate the environmental factors that contibute to it. That much is already obvious, but what I want to say is that it's important to do this while having the right mindset. If you do this just because it's written here you'll be getting the suggestions of the commenters of this thread, but that's not enough because the key lies in auto-suggestion. It would be good if you could attend to understanding how your attention can drift to be able to evaluate the situation. If you "direct your attention to knowing how your attention drifts" you start to understand how your unconcious mind really drifts and once you become conciously aware of it you can manipulate it and work with it to produced the desired outcome. This means you start to know how your environment (e.g news, your behavioural habits, family ...) could affect your unconcious mind and you figure out what environmental stimuli to avoid and which ones to expose yourself to. Thus, you knowingly start to control your exposure to stimuli according to your needs. All this can help your attention by reducing the distractions and the environmental noise that you get exposed to. There would be less stuff to direct your attention away from, which makes it easier to control the flow of your attention...
Furthermore, as others have pointed out you need to cultivate interest in the thing you're trying to concentrate on. This might not be easy but it's the key. INTPs are very good with thinking of possibilities so perhaps you could use that to come up creative ways to cultivate their interest in the thing you want to concentrate on.
"Wanting to concentrate" for the sake of concentration is problematic because you will direct your attention towards "concentrating" not towards the "topic being studied" and that's not good. We're more likely to remember the things we're interested in. When we read a book or article, we tend to only remember the parts of the article that has personal relevance to us or the parts that we found particularly interesting. The more interesting something is to us, the more we direct our attention to it and the more of it we retain. Attending to the subject due to interest, is much better than attending to "concentrating on the subject", as other have already pointed out.
Not sure I presented the ideas clearly though ....