The gentiles were NEVER under bondage to the law.
The Bible student must understand that the Old Testament gives much more prominence to the history of the Hebrew nation than it does to the religious conditions of the Gentiles. And there is a very good reason for this. The Old Testament writers, under the guiding hand of God, principally were concerned with relating the story of the unfolding of Jehovah’s great plan of redemption -- to be consummated by the work of Christ.
Since the Lord was using the Israelite people in the implementation of his sacred purpose, it is understandable that considerably more attention was given to these people and their worship practices -- which were a “shadow of things to come” (Col. 2:17; cf. Heb. 8:5; 10:1) -- than to Gentile procedures.
This does not imply, however, that the Almighty was unconcerned with the Gentiles, or that they were outside the pale of salvation. God’s rebuke of the nations through his prophets (cf. Amos 1; Jeremiah 46-51) bears ample testimony to their accountability to the Creator. And Jonah’s missionary endeavor to the people of Nineveh in far-away Assyria is an illustration of the Lord’s interest in Gentile people -- even while the main focus remained upon the nation of Israel.
Additionally, Romans 2 specifically deals with the application of the Law to the Gentile.
Romans 2 NASB
9 There will be tribulation and distress for every soul of man who does evil, of the Jew first and also of the Greek,
10 but glory and honor and peace to everyone who does good, to the Jew first and also to the Greek.
11 For there is no partiality with God.
12 For all who have sinned without the Law will also perish without the Law, and all who have sinned under the Law will be judged by the Law;
13 for it is not the hearers of the Law who are just before God, but the doers of the Law will be justified.
14 For when Gentiles who do not have the Law do instinctively the things of the Law, these, not having the Law, are a law to themselves,
15 in that they show the work of the Law written in their hearts, their conscience bearing witness and their thoughts alternately accusing or else defending them,
16 on the day when, according to my gospel, God will judge the secrets of men through Christ Jesus.
Quite obviously, the Law applied to both Jew and Greek/Gentile. The fact that God judges the unenlightened based upon the Law written on their hearts speaks volumes of the far-reaching effect of God's Law, and how it was expressed to all of mankind regardless of being Jew or Gentile.