The dishwasher should have a dedicated properly grounded branch circuit to connect the 3 wire setup which includes the ground wire.
If a 3-prong power supply is used, it should be in an accessible location adjacent to the dishwasher within 4 ft. (1.22 m) of the dishwasher side and not behind the dishwasher.

The best location for the electrical conduit is on the right side of the back wall. Re-route the electrical cable before installation if the electrical conduit pipe is longer than 3” (76 mm) and is centered on the back wall.
Turn off electrical power to the unit at the circuit breaker.
Use a Phillips screwdriver to remove the screw from the junction box cover and remove the cover.

Use a Phillips screwdriver to remove 2 screws a.

Remove the junction box from the appliance.

Insert a 3/8” strain relief b through the hole in the junction box. Tighten the ring nut c to secure it in place.

Insert the electrical cable through the hole in the strain relief. Tighten 2 screws to secure the cable.

Pull the existing wires through the openings in the junction box. Tighten 2 screws d to reassemble the junction box in the appliance.

Pair the white, black, and green wires to the matching colored wires from the dishwasher. Then twist on the provided wire nuts e tightly to connect the corresponding wires.

Wrap electrical tape f around each connection.

Fold the connected wires back into the junction box and screw on the junction box cover.
Verify that the black wire is hot (120 V). If not, or if you are unsure of the power supply, have it checked by a licensed electrician.
Do not leave stripped wire exposed. Trim stripped wire to fit completely inside wire nuts.