basicaly, "-로" and "-에" has same meaning but usage is little different
"-로" is for direction and "-에" is for place
so in that case, school is could ne direction and place both
so you can use "-로" and "-에" in most of case
when you describe about only directions, then you have to use only "-로"
like "to east, to west, to north, to south, to downstairs, to upstairs, etc"
but if you are confused about whicn case is for "-로" or "-에",
then just don't use "-로" or "-에" in sentence, it's also correct grammar
ex) 학교로 간다 = 학교에 간다 = 학교 간다 = going to shcool
공항으로 간다 = 공항에 간다 = 공항 간다 = going to airport
but there is exceptions,
when you describe "east, west, north, south, left and right, etc", then you have to use "-로"
and when you decribe place or direction what has only one syllable,
then you can't omit "-로" or "-에" in sentence
ex) 산으로 간다(O) = 산에 간다(O) = 산 간다(X) = going to mauntain
강으로 간다(O) = 강에 간다(O) = 강 간다(X) = going to river
위로 간다(O) = 위에 간다(O) = 위 간다(X) = going to UP
동쪽으로 간다(O) = 동쪽에 간다(X) = 동쪽 간다(X) = going to east