Swept Blend with Two Profiles in Dynamo

Few options, the ‘best’ will depend on what shape exactly you are after.

https://dictionary.dynamobim.com/#/Geometry/Surface/Create/ByLoft(crossSections_Curve[]-guideCurves_Curve[])

https://dictionary.dynamobim.com/#/Geometry/PolySurface/Create/ByLoftGuides

https://dictionary.dynamobim.com/#/Geometry/PolySurface/Create/BySweep(rail_Curve-profile_Curve)