Costa Rica is asking a United Nations court to order Nicaragua to withdraw its troops from disputed land along the river that forms the border between the two nations .