First of all, "are to ensure", but not "to be detrimental", has the pattern "BE TO + VERB". ("detrimental" is an adjective, not a verb, and the group it appears in contains 'to be', not 'be to'.)
As for the "if we are to ensure", it can be paraphrased as any of the following:
if we are...