As long as the end fits are either 1 in., 1-1/8 in., and 1-1/4 in. stubs, it will fit.
Had the same problem - we restricted flow with a valve on hose and all worked fine - UNTIL...….replaced washer with a new model and everything went bad. Turned out old washer had sensors that told the machine that all water had drained - new washer uses TIME to tell machine that all water SHOULD be drained. Because valve restricted flow, all water was NOT drained when machine went into next cycle. Machine got all screwed up - would not work properly at all. Bottom line - house is old, had cast iron drain that was pretty clogged up causing water to back up. Had it cleaned out - NO WORKY!!! Ended up having pipes replaced with PVC. WAS NOT CHEAP.....but all works well now.
They make an extension drain hose that will help.