@tim's answer already covers the Press Freedom Index methodology.

I'd like to add that for the United States the significant component of the result is the abuses score of [37.40][1]. 

This is a fairly large number: the second highest among the top 50, after Denmark (which, apparently, experienced multiple high-profile journalists murders last year).

US Press Freedom Tracker [lists 122 cases of abuse in 2018][2]  including:

 - 42 physical attacks;
 - 26 subpoenas/legal orders;
 - 11 arrests;
 - 4 border stops;
 - 8 chilling statements (6 of them from Trump).

As far as I can tell from the methodology, the last category is not included in the abuses score (I can't be sure about my French):

[![enter image description here][3]][3]

If the US had the lower abuses score its overall score would have been 20.32 (28th place, just behind Slovakia). 

As the abuses score isn't weighted to population, it isn't surprising that the US ranks lower than New Zealand:

 - The US is [60 times larger][4] than New Zealand in terms of population.
 - The US is, by and large, a [more violent][5] country. 
 - The US has a huge news media industry. Wikipedia [lists][6] 15 nationwide networks for the US and 1 for New Zealand. I'm pretty sure that the difference is even larger on the local level.



  [1]: https://rsf.org/en/ranking_table
  [2]: https://pressfreedomtracker.us/all-incidents/?date_lower=2018-01-01&date_upper=2018-12-31
  [3]: https://i.sstatic.net/nCj5m.png
  [4]: https://en.wikipedia.org/wiki/List_of_countries_by_population_(United_Nations)
  [5]: https://en.wikipedia.org/wiki/List_of_countries_by_intentional_homicide_rate
  [6]: https://en.wikipedia.org/wiki/List_of_news_television_channels