Should a 2-year-old be neutered? Yes, definitely,
if you might not be able to prevent unwanted pregnancies.
Might it stop the marking? It might, it might not. From what I've read, there's not a definitive answer to that queston. If his marking is "driving you round the bend", it may well be worth a try.
I would discuss it with your vet first. There seems to be conflicting information out there. One vet, for instance, said to me that it now appears that
in small dogs, much of their testosterone seems to originate from sources other than their testicles (the brain, I believe, is primarily the other source). Obviously, that is in direct conflict with what Amanda's vet said. So, who knows...