In a sense, I think you are right and perhaps my bias is showing. From the perspective of a judge or prosecutor, they followed a legal process and gave a legal order, so there is no violation of due process in their eyes.
Through the eyes of a person compelled to give testimony, we may reach a different conclusion. Consider a journalist who is granted immunity and asked to give up their source. They refuse and spend six months in jail, with few to no options to appeal for their freedom. This isn't theoretical. It happens occasionally.
The definition of due process can vary from the common definition of fair treatment under the law, to the view more often taken by lawyers and governments that it just means following the process of the law as accepted by the courts and respecting legal rights.
The reporter probably would feel as though they weren't treated fairly under the law, but the prosecutor would argue that they followed the law in full. I probably should not have used the phrase "without due process" in this case, since that will make it difficult to communicate with anyone holding views of the government or lawyers.