Replace how? My guess is that one of the “loop remodeling” methods is going to be what you want. (The RosettaRemodel application in the just-released Rosetta3.5 – https://www.rosettacommons.org/manuals/archive/rosetta3.5_user_guide/d1/d8c/remodel.html – will possibly be the most versatile option in this regard.) Loops in Rosetta aren’t limited to certain secondary structure designations, so you can do “loop remodeling” on a helix. Just make sure the fragments and any secondary structure designations you input are clear in calling that region of the protein to be helical (or whatever secondary structure you want there).