Architecture-Driven Modernization (ADM) is a special kind of reengineering that employs models along the process. The main ADM metamodel is the Knowledge Discovery Metamodel (KDM), which is a platform-independent metamodel able to represent several views of a system. Although a lot of research is currently focused on the reverse engineering phase of ADM, little has been devoted to the forward engineering one, mainly on the generation of Platform-Specific Models (PSMs) from KDM. The forward engineering phase is essential because it belongs to the end of the horseshoe model, completing the reengineering process. Besides, the lack of research and the absence of tooling support in this phase hinder the industrial adoption of ADM. Therefore, in this paper, we present a process for creating Transformation Engines (TEs) capable of transforming KDM instances in a chosen PSM. We highlight two main contributions in this work. The first is a process that software engineers can follow for building TEs capable of generating PSM instances (e.g., Java model, Python model, etc.) from KDM instances. Having that on their hands, modernization engineers can then use generators for generating language-specific source code from the PSM. The second is delivering a specific TE called RUTE-K2J, which is able to generate Java models from KDM models. The transformation rules of RUTE-K2J have been tested considering sets of common code structures that normally appear when modernizing systems. The test cases have shown that in this version of RUTE the transformation rules are able to correctly generate 92% of the source code submitted to the transformation.