Heck is the non-cussing version of hell, just like darn is the non-cussing version of damn. Both heck, and darn sound sort of prudish, in my opinion.
That said, I think "If you don't give a heck" sounds pretty awkward (and so does "If you don't give a hell"), but I agree with Ryan Lucas's definition. You're more likely to hear "damn" in this phrase, as in the immortal words of Clark Gable: "Frankly my dear, I don't give a damn."