A top US general says their lives could be in danger as American troops prepare to leave Afghanistan.