String str0 = str.substring(0);
returns a substring starting a position 0 and ending at the end of the original string. So in your case it returns "abc", which you compare to "a".
You can use String str0 = str.substring(0,1);
instead.
Or as commented, you can look at each character individually:
String str = textField_1.getText();
int[] vals = new int[3];
//you should check that your string is at least 3 characters long
String lower = str.toLowerCase(); //no need to equalsIgnorCase any more
for (int i = 0; i < 3; i++) { //loop over the first 3 characters
char c = lower.charAt(i);
if (c >= 'a' && c <= 'd') vals[i] = c - 'a' + 1; //populate the array
}
textField_2.setText("" + Integer.toString(vals[0]) + (vals[1]) + (vals[2]));