Police had no duty to protect Brooklyn teen, judge rules