I think if I can use "it doesn't matter ~", then I can also use "no matter ~". So to understand it more deeply and make sure of it, I've made two sentences and I'd like to know if these two sentences are the same meaning.
Whether it's in the library or in a coffee shop, it doesn't matter where you study. What's more important is if you have an willingness to study hard.
No matter where you study, whether it's in the library or at a coffee shop, what's more important is if you have an willingness to study hard.