Homophones are words that have the same or similar pronunciations, but different meanings. 'Altar' and 'alter' are homophones.
Options A and B:
'Alter' means 'to change'. It is relevant to the given sentence in meaning: John refused to change his decision.
'Altar' is an elevated place or structure, like a platform.
This word does not fit into the sentence in meaning as well as in structure. The object of the preposition 'to' must be a verb 'alter' and not a noun 'altar'.
Hence option B is correct and A is incorrect.
Options C and D are incorrect for the same: C cannot be correct because A is incorrect, and D cannot be correct because B is correct.