Yes, you can use a flexible gas line. Flexible gas lines are perfectly safe as long as they're installed correctly. Besides, it would help if you only used it for short runs, such as from the stove to the wall. For longer runs, you will need to use a rigid pipe. As a result, you can use a flexible gas line for your furnace if it's no more than 3 feet long.