She was hospitalized for six weeks due to illness.

Literal

She [topic-は] illness [with-で] six-weeks hospitalized.

6週間入院した — the duration precedes the verb directly, no particle needed for time spans.