Training set error is error specific to training example (feature) or subset of the dataset where as cost function measures the discrepancy between the predicted value to the actual value.
Training set error and cost function are not same but closely related as higher training set error can lead to higher cost function.
because cost function measures models performance on training data (and not on cv data), regularisation term or lambda basically helps in normalisation of data distribution in case highly skewed data which could cause high training error rate or high cost function.
Perhaps the confusion between these two terminology could have raised because cost function is also called as error function.
Here is another discussion which explains the use of lambda value to the cost function.