Legislation proposed in US senate to end Afghan war