I also wanted to know the difference between them, so I looked up 'need' in the dictionary. Longman Dictionary said:
The most common noun patterns are a need for something and a need to do something : her need for friendship | a need to preserve the environment
!! Say there is a need , not 'it is a need'. Say a need for , not 'a need of' : There is a desperate need for cash.
You can also use the expression be in need of something : We are in need of funds (NOT We have a need of funds).
The dictionary seemed to tell me that 'need of' only comes after 'in'.