(Devarim 21:4) "And the elders of that city shall bring the heifer down": I might think that this is (only) a mitzvah, (but not a categorical requirement); it is, therefore, written again "the elders of that city," after having been written before (verse 3), to make it a categorical requirement. From here they ruled: If the body were found near the border or near a city inhabited mostly by gentiles or near a city lacking a beth-din, they would not measure.
The Unsolved Murder and the Broken-Necked Heifer
Sifrei Devarim 207:1