Write SQL query to solve given problem: What is the product cost end date with the highest weight in grams?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT T2.EndDate FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.WeightUnitMeasureCode = 'G' ORDER BY T1.Weight DESC LIMIT 1