The second is correct. This is an example of an indirect (or embedded) question. In this type of question the information seeking part of the sentence follows the word order of the statement, not the question.
I wonder if he is happy Not I wonder if is he happy. IF appears here because the real question (Is he happy) is a yes/no question.
Do you know how old he is? Not Do you know how old is he?
Can you tell me where the theatre is? Not Can you tell me where is the theatre?