に is used when asking questions to the target (e.g. questionnaire research). This に is the same as 二十歳の女性に聞いた, therefore it can't be used in, for instance, 公園の樹木を調査した instead of を (because woods can't answer your questions). を has a nuance that the subject researches the target directly as in my example above, but it's acceptable if the word order is 結婚の意識について二十歳の女性を調査した probably due to collocation.