The formatting is a bit off - you don't need to close the AMPscript block after each line, but that really shouldn’t be an issue.
Not sure why you are setting the @status twice - the first one will get overwritten by the second one anyway.
To be able to troubleshoot, you can wrap your block in a try/catch statement.
Try below - my guess is that you have some required fields on a Contact which are not present in your script, eg. email address. Also, make sure you are using the correct API names of the fields on the Contact object.
You should be able to troubleshoot using below:
<script runat="server">
Platform.Load("core","1");
try {
</script>
%%[
VAR @fname, @lname, @contactId
SET @fname = RequestParameter("fname")
SET @lname = RequestParameter("lname")
SET @contactId = CreateSalesforceObject("Contact", 2, "FirstName", @fname, "LastName", @lname)
]%%
<script runat="server">
}
catch (err) {
Write("Error Message: " + Stringify(err.message) + Stringify(err.description));
}
</script>
Thank You! %%=v(@fname)=%% %%=v(@lname)=%% for registering with us.Hope to see you at the Marathon. Keep Running and Have Fun!!
If this doesn’t help, can you paste the whole code, including the form. Maybe the values from the form are not being passed correctly - you can read more about Salesforce integrated forms in Marketing Cloud here.