destring varlist, generate(newvarlist) is what you want when your string really is a number (often happens when you import data with dollar signs or NA values).
If cpigen doesn't have the years or series that you want, you can also get CPI data from FRED. Either download from the FRED site or go to File > Import > Federal Reserve Economic Data, and search for CPIAUCSL.