A helicopter carrying security forces crashed in western Afghanistan, killing all five people on board, including the pilot, officials said on Saturday, but ruled out a militant attack.