Why is に used in this particular sentence?
I'd use で because I think する is an action verb, not a state verb.
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It only takes a minute to sign up.Sign up to join this community
This に is a destination marker, the same に as in 日本に行く. You can say 日本へ留学すれば, too. It's also possible to say 日本で留学すれば, but we usually prefer に/へ. You can find examples here. (So this means that "to study abroad" sometimes does not work as a direct translation of 留学. I think we have to remember this fact.)