I believe the нужно is for agreement with учить, not for язык. нужно + verb infinitive...Another example which confused me was when I asked a Russian native to say "Because I need to learn Russian" which she replied; Потему что мне нужно учить русский язык ...