The Boston Police Department announced the death of an active-duty officer who’d served the department for nearly 20 years.