US defense chief ends program Trump signed into law