Over the coming decades, maritime transportation will transition from fossil hydrocarbon fuels to hydrogen, ammonia, and synthetic hydrocarbon fuels produced using renewable electricity as the primary energy source. In this context, a shipowner needs to identify a cost-efficient plan for the adoption of alternative fuels and onboard energy conversion system retrofits. This paper presents a multiperiod decision model for the selection of energy system components under increasingly stringent CO2 emissions regulations and cost forecasts over a multidecade planning horizon. The model considers the choice of newbuild architecture, timing of retrofits, component sizes, and allocation of fuels to converters with the objective of minimizing total cost of ownership (TCO). The decision problem is formulated as a discrete time multiperiod mixed-integer linear program. The application of the model is numerically illustrated for a Baltic Sea roll-on/roll-off ferry. The main findings are: (i) modifying the energy system with retrofits obtains 43% lower TCO compared to fuel switching alone; (ii) batteries contribute to 23% lower TCO; (iii) optimal component installation period can be shorter than their maximum lifetime; (iv) running an engine with hydrogen is favored over fuel cells and (v) hybrid propulsion is the key future-proofing design choice for short sea vessels.