In general:

Placing a displacement at the boundary of your model to represent a boundary condition would insinuate that the boundary condition is known, not unknown, or, at least partially known.

When you apply the displacement, you are stating "I know the pipe will move this much" or "This is more movement than the pipe will ever see, so this is conservative."

So, pick a point outside your "in scope" piping that you know how much it will displace.

Specifically:

If your entire line is buried, it's generally accepted that it's not going to be a temperature significantly different from that of the ground, i.e. ambient conditions.

Further, underground piping is much more blind to short-to-medium lengths of pipe than above-ground piping. If point A doesn't care what happens at point B, then it doesn't make sense to model to point C.