Array modifier sets the distance in between instances according to the given input that you assign, this applies to start/end caps, so unless the start and end caps have the same thickness on the array axis (in your case the Y axis) there will be a gap or they will overlay with the Array object, I found 2 solutions to this:
1- Make a copy of the start/end object so that you have two copies using Shift
so you can use one of them for the start cap and the other for the end cap
2- Enter the start cap object's Edit mode using Tab
, select all using A
then move the mesh on the axis used for Array, in your case it's the Y axis, press G
and move your cursor, in your case the origin should be outside the mesh, think of it this way, the distance in between the origin of the start object and the surface touching the Array object, should be the same width of the Array object on Y axis.
3- Do the same for the End object, except that the direction of the movement should be reversed.
Notice the origin in the image above.
Keep in mind that if you assign the Start or End cap before moving the origin of their objects, you will need to re-assign after editing, the Array modifier will not update automatically.
You can use two Array modifiers, one of them to repeat the Array object on the Y axis, without using the Start/End cap object.
Then use the second modifier only for the cap object, so the repeat in the second modifier should be Count:1, then select the cap and end object and use the input in Relative or Constant or both, to set the distance input.
This way you are assigning separate input for the array itself (using the first array) and for the the Start/End cap (using the second array).
You will still need to move the origin of the Start/End cap object, but you don't have to make separate copies for the Start cap and the End cap.
Hope this was helpful, happy blending!