In the link to EXTRA_CONFIDENCE_SCORES you'll see that it returns a float array, not a string array.
Therefore you'll have to use something like this:
float [] confidence = data.getFloatArrayExtra(RecognizerIntent.EXTRA_CONFIDENCE_SCORES);
Be aware though, there are some bugs identified with the confidence scores.