What was the biggest mistake the detectives made?
I think the biggest mistake was Mills chasing John as soon as he's ambushed.
This resulted in the serial killer realizing he was caught, changing his plans and seeking revenge on Mills.
They should have played it cool, wait for the killer to leave his apartment and set a trap for him when he comes back.