I am somewhat confused.
What I think you want is that the truck has a 7 pin connector. You want a mating 7 pin connector on the trailer. You only want/need to use 4 of the 7 to power the trailer. There is no 4 pin connector or 4 pin to 4 pin connector involved.
If this is what you want.
You simply use a 12V ice pick tester to see what each of the 7 truck pins operate, find the 4 functions you want, and wire 4 of the 7 trailer pins accordingly, with 3 not wired. Forget colors.
You will obviously have to apply brakes, turn signals and running lights on the truck while finding the 4 functions you want. That may take two people.
Be sure you know how ground is accomplished on truck and on trailer. Some are thru the ball, so be sure trailer is attached to truck ball and ball is making good contact. If the truck connector has it's ground on a pin, be sure that pin is carried thru to however the trailer lights are grounded. Most trailers ground the bulb sockets to the trailer frame, which passes ground thru the ball on truck. So don't mix apples and oranges regarding ground methods. Check to see how each trailer light is grounded. You may need a 5th ground wire. Use the tester to follow power all the way to bulb/socket if bulb won't light. Be sure bulb is not burnt out....or a fuse somewhere.