How to find the mean of a column relative to another column?
You need to change inplace to False (which is the default).

Setting it to True changes the dataframe in place, so you don't have to assign the column again. Also, setting inplace=True returns None. So, either:

train['GarageYrBlt'] = train['GarageYrBlt']
     .fillna(train.groupby('YearBuilt')['GarageYrBlt']
     .transform("median"), inplace=False)


or

train['GarageYrBlt']
     .fillna(train.groupby('YearBuilt')['GarageYrBlt']
     .transform("median"), inplace=True)