An anachronism is defined as an event that appears out of time. An example would be a reference to an event that had not yet occurred.
In I Nephi 7:14, we find Nephi mourning the fact that Jeremiah had been cast into prison. It appears from the text that he is saying this happened before they supposedly left Jerusalem. According to the Book of Mormon, Nephi and his family left Jerusalem in the first year of the reign of King Zedekiah (I Nephi 1:4). According to the Bible, Jeremiah was imprisoned in the tenth year of King Zedekiah (Jeremiah 32:1-2).
The only way to avoid an anachronism is to assume that Nephi was not referring to something that happened before they left but to an event that happened after he and his family had already been in the wilderness nine years or more. However, this is impossible in light of what I Nephi 17:4 states, which is chronologically some time after the events of I Nephi 7:14.
The obvious answer to this problem is that Joseph Smith inserted the reference to Jeremiah into the Book of Mormon as he was writing it, without realising that he had created an anachronism.