It seems like it's only in context. However, this question does not provide any context and "apologize" is clearly shown as an option when you click to translate "desculpo." I really can't see why "apologize" is marked incorrect.
That would be wrong both grammatically and in the meaning of the verb. Grammatically, your sentence should be "I apologize to the boy" -- but that has the opposite meaning of "I forgive/excuse the boy"