The first choice is the correct choice. I understand why it's confusing because it's hard for me to come up with a reason for it.
The perfect past (had been) is used to show that an action was completed at the time. When he was discovered he was still 13. He wasn't finished being 13, so using 'had been 13' doesn't make sense.
The phrase 'he had been 13' only makes sense in a sentence like this:
When he was 14 he was famous, but when he was discovered he was 13 and had only been 13 for three months.
The context of this sentence is 'when he was 14'. By that time he was finished being 13, so we can use 'had been 13'