The manhunt for a U.S. Army reservist suspected of killing 18 people has ended.