We're taught a version of the Revolutionary War that is somewhat incomplete. One aspect that is often overlooked is the time at Valley Forge.
Washington set up a camp there at the end of 1777, and remained there through the summer of 1778. The very high-level general purpose was to prepare for the future of the war, to train the troops while he waited for reinforcements, word on the French, etc. The British knew full well they were there, and just let them be - but kept an eye on them.
Things were definitely rough for the Continental Army, but Washington did two very important things that ultimately led them to victory. The first was that he brought on Prussian Inspector General Baron von Steuben to organize and train the troops.
The second thing was something that's still relevant today. To this point, Washington might be considered "anti-vax" by today's standards. His rationale was that exposing his men to the diseases took them out of commission for a few days to a few weeks while their bodies developed an immune response. He wanted them to be ready to engage at any time.
But Washington saw the error of his ways as Small Pox was ravaging the Americas. There was an inoculation available, and he decided to take advantage of it, thus protecting his troops from falling ill.
Yes, he ordered vaccines be administered to everyone in his army. And that left his troops healthy as they fought the British.
You can read more about Washington's stance on vaccines in the attached links. The second one - somewhat surprisingly because I would not expect such a thing from this admistration - is from the National Parks Service.