The nonprofit, which provides shelter and supportive housing for homeless people, was one of 40 organizations to receive grants.