The equivalent to the phrase “a matter/question of time” in most European languages is literally “a question of time”, e.g. una cuestión de tiempo in Spanish or eine Frage der Zeit in German. In English, both “a matter of time” and “a question of time” are acceptable; however, take a look at the following diagram showing how common the two phrases have been in literature throughout the years:
As you can see, the phrase “a question of time” is slowly falling out of fashion. The difference is even more pronounced in connection with “just”, so you may want to say “it’s just a matter of time” instead of “it’s just a question of time” to sound more natural: