"Not the less" is not generally used in English today, at least not in the sense you're using it.
While Thoreau may have used it, it's an uncommon usage nowadays, and may be seen as incorrect, depending on where you use it. Regardless, it's not something I would expect to see with any frequency in more recent writing.
There are, as far as I can tell – with thanks to @Tᴚoɯɐuo – two main ways to understand this sentence. Either:
- The sentence means "[The government] is necessary even though it is a wooden gun, because of that very fact". In this case, I think the word you're looking for is "nonetheless" or "nevertheless", both of which can be used in this context: "But it is nonetheless necessary for this..." or "But it is nevertheless necessary for this..." For another example of this sort of usage of "not the less", here's a quote from Ralph Waldo Emerson:
Not the less the popular measures of progress will ever be the arts and the laws.
Or:
- The sentence means "The government is not less necessary because it is a wooden gun". In this case "not the less" could be paraphrased well with something like "not less" or (as @Tᴚoɯɐuo suggests) "not any less".
Nonetheless*, "not the less" is uncommon when used in the manner described in case 2, and – I'd say – even archaic in when used in the manner described in case 1. Unless you're seeking a very specific tone, I'd stay away from it.
* See what I did there? :)