These two are not mutually exclusive. The war was certainly lost because the British lost the will to fight, but we should not minimize the Americans' "contribution" to this loss of will.
In order for the war to be won, the Americans were going to have to hold out long enough to make the British lose the will to fight. This was by no means a sure thing for the Americans. Think about the situations the Americans faced at times like the winter of 1776 or during the next winter while the army was at Valley Forge. These were times, as Paine put it, that "tried men's souls." It was due to the dedication of the Americans that they were able to continue to fight through these adversities.
The British eventually lost the war because they lost the will to fight. But they would not have gotten to that point without the heroism and determination of the Americans.