The correct answer is B. am going to buy.

The simple future tense is used to talk about things that will happen in the future. It is formed by adding the verb "to be" to the infinitive form of the verb. In this case, the verb is "buy." The simple future tense can be used to talk about things that are planned or expected to happen in the future. In this case, the speaker is planning to buy a book for his sister for her birthday.

The other options are not correct because they do not express the speaker's intention to buy the book in the future. Option A, will have bought, is used to talk about things that will have happened by a specific time in the future. Option C, will be buying, is used to talk about things that are happening or will be happening in the future. Option D, will not be buying, is used to talk about things that will not happen in the future.