Diagnosis
The water inlet valve solenoid is failing. On steam cycles, it pulses rapidly. A worn solenoid can hammer against its housing.
How to Fix It
You need to replace the water inlet valve assembly. It's located at the rear top of the dryer. Shut off the water supply and unplug the dryer. Remove the top panel. Disconnect the water lines and wiring harness. Install the new valve (part #5304520501).
If That Didn't Work
The noise could be water hammer in your house pipes, not the dryer. Install a water hammer arrestor on the laundry supply line.
Heads Up
When reconnecting water lines, use thread seal tape. Hand-tighten plus a quarter turn with a wrench. Overtightening will crack the plastic valve.