I will answer this question because the question itself relates to an issue that I think is very important:
‘To the detriment of’ is ‘correct’ in the sense that its meaning is established. However, this is not how language ACTUALLY works. The key word here is ‘praxis.’ Praxis is what people say, rather than what Some Guys tell them they should say. It is time that students understood that a HUGE fight is going on in academia over this issue. The fact that ‘in detriment of’ is commonly in use on the net clearly indicates that it is . . . in common use (though I would very much like to know whether the writers are native speakers or not: there are issues relating to the impact of non-native-speaker usage on a language)!! So, if some phrase is (a) comprehensible, and (b) in common use, how can anyone argue that it is incorrect!? Beware of this situation: you are a student in a non-native-English-speaking environment. Almost all the answers to your questions about usage come from one native-speaker teacher. She say, ‘This is/is not correct.’ The reality may well be that your teacher is responsible to a particular politico-academic position, and her argument would be swiftly dismantled in another learning-environment. My advice, in closing, is as follows: there exists, rightly or wrongly (though the distinction is weakening VERY fast) the reality of ‘prestige dialects.’ To say ‘to the detriment of’ is to speak in the prestige dialect of English, and to command the prestige dialect of English is to have a great deal of leverage IN CERTAIN SITUATIONS. The ‘flip side’ of the issue, though, is that if you learn only the prestige dialect (and it is no mistake that few students even understand this elemental aspect of language usage!), which is RARELY SPOKEN, you will understand little of the colloquial English THAT CHARACTERISES USAGE IN THE NATIVE-ENGLISH-SPEAKING WORLD!!