Hello again Runningman, what appears to be a subtle difference between Jeremiah and Romans is actually anything but (especially when the full context of each is considered).
In the former Text, the Law itself is written by God on the hearts of His people/believers, while in the latter, it is "the work of the law" that is seen/written there, the proof of which is in the pudding (so to speak). As one of my commentaries on the Book of Romans puts it,
"They prove that there is imprinted on their hearts a discrimination and judgment by which they distinguish between what is just and unjust, between what is honest and dishonest.
He [Paul] means not that it was so engraven on their will that they sought and diligently pursued it (cf Jeremiah 31:31-34/Hebrews 8:10; Ezekiel 36:26-27), but that they were so mastered by the power of truth that they could not disapprove of it. For why did they institute religious rites, except that they were convinced that God ought to be worshipped? Why were they ashamed of adultery and theft, except that they deemed them evils?" ~Calvin, J., Commentary on the Epistle of Paul the Apostle to the Romans (p. 97)
The former, and passages like it, speak of our possessing a fullness of knowledge/of an immediate and "specific" revelation ~from~ God that He writes in the hearts of those who are and who will be (and who will continue to be) His people.
On the other hand the latter Text/Romans 2:12-16 (see again below), speaks only of a partial knowledge (or sense) of the truth, an immediate, "general" revelation ~of~ God, that ends (as we see) in the judgment & condemnation of the people who possess it, and it alone (see v16). IOW, "the work of the law written on the hearts" of unbelievers proves their guilt, because by it they demonstrate that they know right from wrong (at least basically/inherently), and that this, if nothing else, will be the basis upon which they will be judged by God.
There is much more to discuss about this very interesting topic, but I'll stop here for now.
God bless you!!
~Deuteronomy
Jeremiah 31
31 “The time is coming,” declares the LORD, “when I will make a new covenant with the house of Israel and with the house of Judah.
32 It will not be like the covenant that I made with their forefathers when I took them by the hand to lead them out of Egypt, because they broke my covenant, though I was a husband to them,” declares the LORD.
33 “This is the covenant that I will make with the house of Israel after that time,” declares the LORD. “I will put my law in their minds and write it on their hearts. I will be their God, and they will be my people.
34 No longer will a man teach his neighbor, or a man his brother, saying, ‘Know the LORD,’ because they will all know me, from the least of them to the greatest,” declares the LORD. “For I will forgive their wickedness and will remember their sins no more.”
Romans 2
12 All who sin apart from the law will also perish apart from the law, and all who sin under the law will be judged by the law.
13 For it is not those who hear the law who are righteous in God’s sight, but it is those who obey the law who will be declared righteous.
14 Indeed, when Gentiles, who do not have the law, do by nature things required by the law, they are a law for themselves, even though they do not have the law,
15 since they show that the requirements of the law are written on their hearts, their consciences also bearing witness, and their thoughts now accusing, now even defending them.
16 This will take place on the day when God will judge men’s secrets through Jesus Christ, as my gospel declares.