From my experience, Duolingo has been pretty consistent at accepting the following translations:
l חייב - must (often also "have to")
l צריך - need (and "should" in certain contexts)
I don't remember having any issues. Simply put, חייב implies obligation and צריך necessity. They are not always synonymous and it is reflected in the translations.