In response to the growing demand for sustainable practices, green marketing has emerged as a pivotal approach for companies to engage environmentally aware consumers. This study investigates the impact of green marketing—measured through green product, green price, green promotion, and green place—on green purchase intention, with environmental attitude and environmental knowledge as moderating variables. Focusing on The Body Shop’s personal care products, the research examines Generation Z and Millennial consumers in the Jabodetabek area, Indonesia, who are aware of the brand but have not yet made a purchase. Using an online survey, data were collected from 274 respondents and analysed through Partial Least Squares Structural Equation Modelling (PLS-SEM). The results reveal that green promotion and green place significantly enhance green purchase intention, while green product and green price do not. Moreover, environmental attitude strengthens the relationship between green product and green purchase intention, while environmental knowledge positively moderates the influence of green price and green promotion on green purchase intention. These findings highlight the importance of prioritizing promotional efforts and distribution strategies in green marketing while addressing gaps in environmental knowledge to maximize consumer engagement. The insights provide valuable guidance for businesses in designing effective green marketing strategies tailored to the Indonesian market, contributing to broader sustainability goals