The Security Council is specifically chartered to intervene in matters which threaten world peace and that does not include many decades old ethnic territorial conflicts because if it did, anyone who wanted help from the Security Council could merely push the violence up and up until it acted.
This territorial dispute predated the creation of the United Nations and also predated the world’s first Treaty Organization, the League of Nations. As such, neither body has absolute control to force a settlement upon the parties–those with standing to hold legal claims at all. The core premise of a treaty organization is that everything is ultimately by permission of the members and no other way. Many members have agreed to be governed by the World Court but some have not. Rest well assured that of the ones who do, its mainly because they do not foresee losing any grand cases in the foreseeable future and for the refusnicks, anticipating a loss is not necessarily the same as anticipating or admitting being wrong. Politics trumps justice almost every time.
Usually, a military court acts as a civilian court during an “occupation”. An “occupation” is anticipated to end after the war ends and not before. The military courts can be far more brutal than the civilian courts. The parties in Eastern Jerusalem got a modern civilian court–using fairly normal and customary rules in this era.