Greenhouse gas emissions from the freight transportation sector are a significant contributor to climate change, pollution, and negative health impacts because of the common use of heavy-duty diesel vehicles (HDVs). Governments around the world are working to transition away from diesel HDVs and to electric HDVs, to reduce emissions. Battery electric HDVs and hydrogen fuel cell HDVs are two available alternatives to diesel engines. Each diesel engine HDV, battery-electric HDV, and hydrogen fuel cell HDV powertrain has its own advantages and disadvantages. This work provides a comprehensive review to examine the working mechanism, performance metrics, and recent developments of the aforementioned HDV powertrain technologies. A detailed comparison between the three powertrain technologies, highlighting the advantages and disadvantages of each, is also presented, along with future perspectives of the HDV sector. Overall, diesel engine in HDVs will remain an important technology in the short-term future due to the existing infrastructure and lower costs, despite their high emissions, while battery-electric HDV technology and hydrogen fuel cell HDV technology will be slowly developed to eliminate their barriers, including costs, infrastructure, and performance limitations, to penetrate the HDV market.