"Difficulty of" vs. "difficulty in"

In the sentence:

I understand the difficulty of remaining objective.

Should it be as is, or should it be like this:

I understand the difficulty in remaining objective.


Solution 1:

Why do you think that either might be ‘a horrible sentence’?

The two would be used on different occasions. ‘The difficulty of remaining objective’ states a general principle. ‘The difficulty in remaining objective’ would be more appropriate in a particular case. It might even apply to a case in which someone had already remained objective, or was on the point of doing so.