Solution: Use a pipe alignment tool, such as a come-along, to pull the pipe into the correct position. This will help to straighten and align the pipe with the flange. Consider utilizing spacers or wedges to fill gaps and support alignment throughout the fit-up procedure.