Afghanistan's Taliban government has announced the release of two Americans in a prisoner exchange.