万难 has two registers. As a noun ('countless difficulties') it appears in
历尽万难 (lìjìn wànnán, 'to go through every kind of hardship') and
排除万难 (páichú wànnán, 'overcome all obstacles'). As a formal adverb meaning 'by no means' (
万难答应 = 'absolutely cannot agree'), it's mostly seen in written/official Chinese.