Kitchenaid Dishwasher soap dispenser won't open during cycle

When The wash cycle is complete, the soap tray is still closed

A model number would be helpful.
Find your model number - AppliancePartsPros.com

Check the wires that go from the control board to the dispenser.
See if by manually activating the dispenser plunger if it will opem.
Check the dispenser coil or wax motor (depends on model) with a meter.