I have never seen Latin allow a construction like "a town near the mountain".
It would be more idiomatic to say "a town which is near the mountain", but this might feel too heavy.
However, it is precisely this idea (a relative clause) used by the solution given to you.
It is fine, but there is an option.
As brianpck suggests in his comment, vicinus is a good word here.
Here are some examples:
ora [...] vicina perusti aetheris
(Lucanus, Pharsalia, 9.431–433)
is fidem violat, quam in Capitolio vicinam Iovis optimi maximi
(Cicero, De officiis, 3.104)
sensit anus vicina loci
(Ovidius, Fasti, 6.399)
dixit consularem disertum vicinum consulis sibi dixisse
(Cicero, Epistulae ad Atticum, 2.24.3)
corpus [...] aeriis [...] vicinum
(Lucretius, De Rerum Natura, 4.932–933)
tubicen uicina Curetis cum quateret [...] saxa
(Propertius, Elegiae, 4.4.9–10)
Phyllis Auentinae quaedam est uicina Dianae
Ultima vicinus Phoebo tenet arva Padaeus
(Tibullus, carmina Tibulliana, 3.7.145)
Mantua vae miserae nimium vicina Cremonae
(Vergilius, Eclogae, 9.28)
Thybrim vicinaque Thybridis arva
(Vergilius, Aeneis, 3.500)
Genitive seems to be more common, although there are examples of dative.
I would therefore suggest this:
Miles Herculaneum pervenit, oppidum montis vicinum.
Notice that the preposition in is typically not used for movement into a city.