The correct option is A had been riding
The past perfect continuous tense describes an action that began in the past and continued up to a certain point of time in the past.
The given sentence is in the past perfect continuous tense, as the action 'to ride the bike' began in the past and continued up to a certain point of time "for several years". The structure of this tense is: had been + present participle (riding).
Hence option C is correct.
Option A: 'Was riding' refer to the past continuous tense, whereas the time here is past perfect continuous (ppf).
Option B: 'Was ridden' is in the passive voice (indicates that the subject receives the action) whereas the sentence is in active voice.
Option D: 'Is riding' refers to the present time, not the ppf.
Hence options A, B and D are incorrect.