When did Finland surrender to the soviet union after a heroic battle?

They didn't. Winter War (1939-1940) ended in Moscow Peace treaty that was signed by both parties on March 12, 1940. Continuation War (1941-1944) instead ended first in ceasefire on September 4, 1944 and a bit more formally to Moscow Armistice on September 19, 1944. Final peace treaty was not signed until at Paris at 1947.