。
She tried not to think about the young man, but it was no use.
Literal
She [topic-は] that young-man [about-のこと] [object-を] not-think [in order to-ように] strove [but-が], impossible was.
A telling structure for unrequited or forbidden attachment. のこと is a placeholder noun that softens or extends a referent — ~のことを考える is the standard frame for thinking about a person, with のこと standing in for 'the broader matter of them.' ~ないように努める ('strive not to do X') describes the deliberate effort. The clause-final が ('but') sets up contrast with the brief, devastating final clause: 無理だった ('it was impossible'). The structure leaves you with the failure — and the implication that the young man is on her mind precisely because she's trying not to let him be.