The correct option is C He exclaimed that it was a great pity I had not come.
If we are converting a direct speech which is in Simple past tense then the sentence in indirect speech is converted into past perfect tense, given that the reporting verb is in past tense.
Also we need to convert an exclamatory sentence to assertive sentence before changing to the indirect speech.
Here option C is the correct answer as it is changed to Past perfect tense whereas the options A, B, and D are incorrect as they are not changed to the required past perfect tense.