Perhaps this is true...but with a couple of caveats.
First, a couple of decades ago, there were many fires related to brass flex hoses that became embrittled over time, cracked, and burned down houses. It got so bad at one point that every gas company in the United States was required to warn it's customers about the danger. So, if you ever see a flex hose that is brass on a natural gas line, it should be replaced immediately. The chances that yours is brass are probably 1 in 100,000 ish.
Second, if the flex line shows any problems at all, I would replace it out of hand. It's a good time to do it while you're in there anyway. In fact, if I got your call during my day job, as I've never inspected your line, I would tell you to replace it as a matter of course, because I would not want to tell you to reuse it and then find out there was an associated gas leak later on. So...I guess I'll say "change it".
Finally...you don't replace the shut off valve. Whoever told you that is wrong. The shut off valve is there so you can change the flex line downstream of it without calling the gas company to come shut off the meter (assuming you don't have another valve upstream). As long as the valve properly shuts off the gas, it doesn't need replaced.
Finally...one more piece of advice...regardless, never leave in the middle of the job when the only thing keeping your house from filling up with gas is the quarter turn valve being off. If that valve is ever out of your sight, you need to plug the valve or cap the line so that unintended operation of the valve does not lead to unintended consequences.
Good luck.
Phil