The issue is a failure to define and distinguish properly. The categories get fuzzy. It starts with grammar. There are distinguishable imperatives and indicatives in the Bible. An imperative is a command; an indicative expresses factual statements. The typical form for biblical law is the imperative. The typical form for the gospel is the indicative. The imperative tells us what we’re to do; the indicative tells us what God has done, is doing, and will do.
We also have to reckon with those passages in Scripture where law and gospel are juxtaposed. In 2 Cor. 3:6, the Holy Spirit says “For the letter kills, but the Spirit gives life.” From the context, it’s evident that “the letter” is “the ministry of death, carved in letters on stone” (2 Cor. 3:7) – the law. But the work of the Spirit in giving life is “the ministry of righteousness” (2 Cor. 3:9). In other words, it’s the gospel of Christ (who is our righteousness). In his commentary on this passage, John Calvin notes that it indeed contrasts law and gospel. He writes:
The law was engraven on stones, and hence it was a literal doctrine. This defect of the law required to be corrected by the gospel, because it could not but be brittle, so long as it was merely engraven on tables of stone. The gospel, therefore, is a holy and inviolable covenant, because it was contracted by the Spirit of God, acting as security. From this, too, it follows that the law was the ministry of condemnation and of death; for when men are instructed as to their duty, and hear it declared, that all who do not render satisfaction to the justice of God are cursed (Deut. 27:26), they are convicted, as under sentence of sin and death. From the law, therefore, they derive nothing but a condemnation of this nature, because God there demands what is due to him, and at the same time confers no power to perform it. The gospel, on the other hand, by which men are regenerated, and are reconciled to God, through the free remission of their sins, is the ministry of righteousness, and, consequently, of life also.