Jerusalem seems to be an exception to the rule that all ancient cities must either be on a river or freshwater lake.
First settlement is estimated at 3500 BC.
The nearest major river as far as I can tell from maps seems to be the Jordan River, at ~12mi.