Plug-in class 2 transformer
Original:    PRI 120V 60HZ 0.24A, SEC 12VAC 20VA - 3 wire output AC GRD AC.
Replacement: PRI 120V 60HZ 0.31A, SEC 12VAC 25VA.








simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1 (a) 12 V AC transformer. (b) Center-tapped, 12-0-12 V AC transformer. (c) Centre-tapped 6-0-6 V AC transformer.

You state that the original is three wire and that it is 12 V. What isn't clear is whether that's a 12-0-12 (Fig. 1b) or 6-0-6 (Fig. 1c). You need to double-check.

You don't state that the replacement is centre-tapped. Again, you need to double check.

Power rating is fine. You may find that the output voltage is slightly higher as the 25 VA transformer will be running at a lower percentage of its rated output.