Besides the columns with x and y values, you have to provide the column with the y error. One way to do this is to read your data into a pandas.DataFrame and select the corresponding columns:
import pygmt
import pandas as pd
# Please adjust file name and seperator (sep) to what you are using
data_yerror = pd.read_csv("data_with_yerror.txt", sep=" ")
fig = pygmt.Figure()
fig.basemap(region=[-10, 120, 0, 6], projection="X10c/5c", frame=True)
fig.plot(
# Select columns for x, y and y error
# Columns order after https://docs.generic-mapping-tools.org/6.5/plot.html#e
data=data_yerror[["distance", "motion", "y-error"]],
style="c0.1c",
fill="blue",
error_bar="y", # Plot error bars in y (vertical) direction only
)
fig.show()